summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-28 08:38:28 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-28 08:38:28 +0200
commit84f81dc593e8e21cbfb4596aef375d45e3a26ba8 (patch)
treeb916d4acfbe4f32ab06b052fd06c072f858bdce1 /configure.in
parent49e0eea578eb119cafb2df1ba77b35fcf8391224 (diff)
downloadmariadb-git-84f81dc593e8e21cbfb4596aef375d45e3a26ba8.tar.gz
Fixes for Netware
Call pthread_mutex_destroy() on not used mutex. Changed comments in .h and .c files from // -> /* */ Added detection of mutex on which one didn't call pthread_mutex_destroy() Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression" Added optimisation for ORDER BY NULL BitKeeper/deleted/.del-ChangeLog~dfc92e15bee6fc75: Delete: sql/ChangeLog BUILD/compile-pentium-valgrind-max: Don't use valgrind with safemalloc as this can hide some bugs Makefile.am: Added platform dirs bdb/os/os_handle.c: Portability fix client/mysql.cc: Fixes for Netware. Fixed duplicate output when using 'tee' Simple optimisations client/mysqldump.c: Portability fix client/mysqltest.c: Portability fix configure.in: Fixes for Netware extra/resolveip.c: Fixes for Netware include/Makefile.am: Fixes for Netware include/config-win.h: Portability fix include/my_global.h: Fixes for Netware include/my_net.h: Fixes for Netware include/my_pthread.h: Fixes for Netware Added detection of mutexes that was not destroyed include/my_sys.h: Fixes for Netware Added 'extern' before external functions include/mysql.h: Fixes for Netware innobase/configure.in: Fixes for Netware innobase/include/os0thread.h: Fixes for Netware innobase/os/os0sync.c: Fixes for Netware innobase/os/os0thread.c: Fixes for Netware innobase/srv/srv0srv.c: Fixes for Netware innobase/srv/srv0start.c: Fixes for Netware innobase/sync/sync0sync.c: Fixes for Netware isam/test3.c: Disable test on Netware libmysql/Makefile.shared: Added my_sleep libmysql/get_password.c: Fixes for Netware libmysql/libmysql.c: Fixes for Netware Made mysql_once_init() global libmysql/manager.c: Fixes for Netware myisam/mi_test3.c: Disable test for netware mysql-test/mysql-test-run.sh: Give warning if output file contains errors mysql-test/r/count_distinct.result: More tests mysql-test/r/group_by.result: Test of ORDER BY NULL mysql-test/t/backup.test: Fixes for Netware mysql-test/t/count_distinct.test: More tests mysql-test/t/func_crypt.test: Fixes for Netware mysql-test/t/grant_cache.test: Fixes for Netware mysql-test/t/group_by.test: Tests of ORDER BY NULL mysql-test/t/rpl000015.test: Fixes for Netware mysql-test/t/rpl000017.test: Fixes for Netware mysql-test/t/rpl_rotate_logs.test: Fixes for Netware mysys/Makefile.am: Added my_sleep.c and my_netware.c mysys/charset.c: Fixes for Netware mysys/default.c: Fixes for Netware mysys/mf_tempfile.c: Fixes for Netware mysys/my_clock.c: Fixes for Netware mysys/my_copy.c: Fixes for Netware mysys/my_getwd.c: Changed function comment from // -> /* */ mysys/my_init.c: Fixes for Netware mysys/my_lock.c: Fixes for Netware mysys/my_messnc.c: Fixes for Netware mysys/my_os2cond.c: Removed comment mysys/my_os2dirsrch.c: Changed function comment from // -> /* */ Fixed indentation mysys/my_os2dirsrch.h: Changed function comment from // -> /* */ Fixed indentation mysys/my_os2file64.c: Changed function comment from // -> /* */ Fixed indentation mysys/my_os2mutex.c: Changed function comment from // -> /* */ Fixed indentation mysys/my_os2thread.c: Changed function comment from // -> /* */ Fixed indentation mysys/my_os2tls.c: Changed function comment from // -> /* */ Fixed indentation mysys/my_pthread.c: Fixes for Netware mysys/my_redel.c: Fixes for Netware mysys/my_tempnam.c: Fixes for Netware mysys/my_thr_init.c: Remove created mutexes when program ends. mysys/mysys_priv.h: Cleanup mysys/safemalloc.c: Prefix error messages with "Error:" mysys/thr_alarm.c: Destroy internal mutex on end_thr_alarm. mysys/thr_mutex.c: Added detection of mutex on which one didn't call pthread_mutex_destroy() scripts/make_binary_distribution.sh: Fixes for Netware sql/des_key_file.cc: Free mutex at end sql/ha_innodb.cc: Free mutex at end sql/ha_myisam.cc: Changed warnings from REPAIR Note: (For mysql-test-run) sql/hostname.cc: Fixes for Netware sql/item.h: Fixed bug in create_tmp_field() which causes a memory overrun sql/item_func.cc: Free used mutexes sql/item_sum.cc: Fixed bug in create_tmp_field() which causes a memory overrun sql/log.cc: Free used mutexes sql/my_lock.c: Fixes for Netware sql/mysql_priv.h: Fixes for Netware sql/mysqld.cc: Fixes for Netware Added Have_crypt Properly free mutexes from MYSQL_LOG by calling cleanup Free mutex before exit sql/repl_failsafe.cc: Fixes for Netware sql/set_var.cc: Added have_crypt sql/share/english/errmsg.txt: Added version socket and port to stderr log sql/slave.cc: Remove global MASTER_INFO variable and use instead an allocated variable. This allows us to correctly free used mutex. sql/slave.h: Move constructors and destuctors to slave.cc (To make it easier to clear all needed variables) sql/sql_base.cc: Safety fix sql/sql_class.h: Portability fixes. Added 'cleanup' to log handling to be able to free mutexes. sql/sql_insert.cc: Fixes for Netware mysys/my_sleep.c: E sql/sql_parse.cc: Fixes for Netware sql/sql_select.cc: Added optimisation for ORDER BY NULL sql/sql_select.h: Fixed bug in create_tmp_field() which causes a memory overrun sql/sql_table.cc: Fixed bug in create_tmp_field() which causes a memory overrun sql/sql_udf.cc: Free mutex on end vio/test-ssl.c: Simple code cleanup vio/test-sslclient.c: Simple code cleanup vio/test-sslserver.c: Simple code cleanup vio/viotest-ssl.c: Simple code cleanup
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in214
1 files changed, 196 insertions, 18 deletions
diff --git a/configure.in b/configure.in
index 92eaf3db151..6e1e274fe3c 100644
--- a/configure.in
+++ b/configure.in
@@ -38,9 +38,18 @@ rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
for i in $AVAILABLE_LANGUAGES
do
AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys"
+ case $SYSTEM_TYPE in
+ *netware* | *modesto*)
+ echo "$i/errmsg.sys: $i/errmsg.txt
+ \$(top_builddir)/extra/comp_err.cyg \$^ $i/errmsg.sys" \
+ >> $AVAILABLE_LANGUAGES_ERRORS_RULES
+ ;;
+ *)
echo "$i/errmsg.sys: $i/errmsg.txt
\$(top_builddir)/extra/comp_err \$^ $i/errmsg.sys" \
>> $AVAILABLE_LANGUAGES_ERRORS_RULES
+ ;;
+ esac
done
#####
@@ -130,7 +139,14 @@ AC_PROG_CXX
AC_PROG_CPP
# Print version of CC and CXX compiler (if they support --version)
+case $SYSTEM_TYPE in
+ *netware*)
+CC_VERSION=`$CC -version | grep -i version`
+ ;;
+ *)
CC_VERSION=`$CC --version | sed 1q`
+ ;;
+esac
if test $? -eq "0"
then
AC_MSG_CHECKING("C Compiler version");
@@ -138,7 +154,14 @@ then
else
CC_VERSION=""
fi
+case $SYSTEM_TYPE in
+ *netware*)
+CXX_VERSION=`$CXX -version | grep -i version`
+ ;;
+ *)
CXX_VERSION=`$CXX --version | sed 1q`
+ ;;
+esac
if test $? -eq "0"
then
AC_MSG_CHECKING("C++ compiler version");
@@ -186,6 +209,11 @@ AC_CHECK_PROG(DVIS, tex, manual.dvi)
AC_MSG_CHECKING("return type of sprintf")
#check the return type of sprintf
+case $SYSTEM_TYPE in
+ *netware*)
+ AC_DEFINE(SPRINTF_RETURNS_INT) AC_MSG_RESULT("int")
+ ;;
+ *)
AC_TRY_RUN([
int main()
{
@@ -205,11 +233,13 @@ AC_DEFINE(SPRINTF_RETURNS_INT) AC_MSG_RESULT("int"),
char buf[6];
if((char*)sprintf(buf,s) == buf + strlen(s))
return 0;
- return -1;
+ return -1;
}
], AC_DEFINE(SPRINTF_RETURNS_PTR) AC_MSG_RESULT("ptr"),
AC_DEFINE(SPRINTF_RETURNS_GARBAGE) AC_MSG_RESULT("garbage")))
-
+ ;;
+esac
+
# option, cache_name, variable,
# code to execute if yes, code to exectute if fail
@@ -361,10 +391,12 @@ dnl Find paths to some shell programs
AC_PATH_PROG(LN, ln, ln)
# This must be able to take a -f flag like normal unix ln.
AC_PATH_PROG(LN_CP_F, ln, ln)
+if ! ( expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null ); then
# If ln -f does not exists use -s (AFS systems)
if test -n "$LN_CP_F"; then
LN_CP_F="$LN_CP_F -s"
fi
+fi
AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(RM, rm, rm)
@@ -429,6 +461,9 @@ else
*cygwin*)
FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
;;
+ *netware* | *modesto*)
+ FIND_PROC=
+ ;;
*)
AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
esac
@@ -853,6 +888,11 @@ fi
NON_THREADED_CLIENT_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>
@@ -873,6 +913,8 @@ int main()
}
], AC_DEFINE(HAVE_INT_8_16_32) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])
)
+ ;;
+esac
#
# Some system specific hacks
@@ -1022,6 +1064,107 @@ dnl Is this the right match for DEC OSF on alpha?
CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
;;
+ *netware*)
+ # No need for curses library so set it to null
+ with_named_curses=""
+
+ #
+ # 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 sql/share/Makefile.in strings/Makefile.in client/Makefile.in
+ do
+ # echo "#### $file ####"
+ filedir="`dirname $file`"
+ filebase="`basename $file`"
+ filesed=$filedir/$filebase.sed
+ #
+ # Backup and always use original file
+ #
+ if test -f $file.bk
+ then
+ cp -fp $file.bk $file
+ else
+ cp -fp $file $file.bk
+ fi
+ case $file in
+ sql/Makefile.in)
+ # Use gen_lex_hash.cyg instead of gen_lex_hash
+ # Add library dependencies to mysqld_DEPENDENCIES
+ lib_DEPENDENCIES="\$(bdb_libs_with_path) \$(innodb_libs) \$(pstack_libs) \$(innodb_system_libs) \$(openssl_libs)"
+ cat > $filesed << EOF
+s,\(^.*\$(MAKE) gen_lex_hash\),#\1,
+s,\(\./gen_lex_hash\),\1.cyg,
+s%\(mysqld_DEPENDENCIES = \) %\1$lib_DEPENDENCIES %
+EOF
+ ;;
+ sql/share/Makefile.in)
+ cat > $filesed << EOF
+s,\(extra/comp_err\),\1.cyg,
+EOF
+ ;;
+ libmysql/Makefile.in)
+ cat > $filesed << EOF
+s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.cyg\2,
+s,\(: conf_to_src\),\1.cyg,
+EOF
+ ;;
+ libmysql_r/Makefile.in)
+ cat > $filesed << EOF
+s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.cyg\2,
+s,\(: conf_to_src\),\1.cyg,
+EOF
+ ;;
+ strings/Makefile.in)
+ cat > $filesed << EOF
+s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.cyg\2,
+s,\(: conf_to_src\),\1.cyg,
+EOF
+ ;;
+ client/Makefile.in)
+ #
+ cat > $filesed << EOF
+s,libmysqlclient.la,.libs/libmysqlclient.a,
+EOF
+ ;;
+ esac
+ if `sed -f $filesed $file > $file.nw`;\
+ then
+ mv -f $file.nw $file
+ rm -f $filesed
+ else
+ exit 1
+ fi
+ # wait for file system changes to complete
+ sleep 1
+ done
+ echo "done"
+
+ #
+ # Make sure the following files are writable.
+ #
+ # When the files are retrieved from some source code control systems they are read-only.
+ #
+ echo -n "making sure specific build files are writable... "
+ for file in \
+ Docs/include.texi \
+ Docs/mysql.info \
+ Docs/manual.txt \
+ Docs/manual_toc.html \
+ Docs/manual.html \
+ Docs/INSTALL-BINARY \
+ INSTALL-SOURCE \
+ COPYING \
+ COPYING.LIB \
+ MIRRORS
+ do
+ if test -e $file; then
+ chmod +w $file
+ fi
+ done
+ echo "done"
+
+ ;;
esac
@@ -1389,7 +1532,12 @@ LIBS="$my_save_LIBS"
AC_SUBST(LIBDL)
# System characteristics
+case $SYSTEM_TYPE in
+ *netware* | *modesto*) ;;
+ *)
AC_SYS_RESTARTABLE_SYSCALLS
+ ;;
+esac
# Build optimized or debug version ?
# First check for gcc and g++
@@ -1414,6 +1562,13 @@ else
OPTIMIZE_CXXFLAGS="-O"
fi
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+ DEBUG_CFLAGS="$DEBUG_CFLAGS -DDEBUG -sym internal,codeview4"
+ DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -DDEBUG -sym internal,codeview4"
+ OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS -DNDEBUG"
+ OPTIMIZE_CXXFLAGS="$OPTIMIZE_CXXFLAGS -DNDEBUG"
+fi
+
AC_ARG_WITH(debug,
[ --without-debug Build a production version without debugging code],
[with_debug=$withval],
@@ -1561,6 +1716,7 @@ MYSQL_CHECK_FP_EXCEPT
# Do the c++ compiler have a bool type
MYSQL_CXX_BOOL
# Check some common bugs with gcc 2.8.# on sparc
+if ! ( expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null ); then
MYSQL_CHECK_LONGLONG_TO_FLOAT
if test "$ac_cv_conv_longlong_to_float" != "yes"
then
@@ -1568,6 +1724,7 @@ then
If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
again]);
fi
+fi
MYSQL_PTHREAD_YIELD
######################################################################
@@ -1988,6 +2145,11 @@ AC_ARG_WITH(readline,
[ with_readline=$withval ],
[ with_readline=yes ]
)
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+ # For NetWare, do not need readline
+ readline_dir=""
+ readline_link=""
+else
if test "$with_readline" = "yes"
then
readline_dir="readline"
@@ -1998,6 +2160,7 @@ else
readline_dir=""
readline_link="-lreadline"
fi
+fi
AC_SUBST(readline_dir)
AC_SUBST(readline_link)
@@ -2031,6 +2194,13 @@ AC_ARG_WITH(extra-charsets,
[extra_charsets="$withval"],
[extra_charsets="none"])
+AC_ARG_WITH(platform-dir,
+ [ --with-platform-dir=DIR
+ Add specified directory to list of SUBDIRS to build.],
+ [ with_platform_dir=$withval ],
+ [ with_platform_dir=no ]
+ )
+
AC_MSG_CHECKING("character sets")
if test "$extra_charsets" = none; then
@@ -2269,11 +2439,18 @@ AC_SUBST(CLIENT_LIBS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)
+platform_dir=
+if test "$with_platform_dir" != "no"
+then
+ platform_dir="$with_platform_dir"
+fi
+AC_SUBST(platform_dir)
+
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE(THREAD)
# Avoid _PROGRAMS names
- THREAD_LPROGRAMS="test_thr_alarm test_thr_lock"
+ THREAD_LPROGRAMS="test_thr_alarm\$(EXEEXT) test_thr_lock\$(EXEEXT)"
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)
@@ -2377,7 +2554,7 @@ EOF
then
innodb_conf_flags=--disable-dependency-tracking
fi
- (cd innobase && sh $rel_srcdir/innobase/configure $innodb_conf_flags) \
+ (cd innobase && sh $rel_srcdir/innobase/configure --host=$host $innodb_conf_flags) \
|| AC_MSG_ERROR([could not configure INNODB])
echo "END OF INNODB CONFIGURATION"
@@ -2435,20 +2612,21 @@ 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 \
- os2/Makefile os2/include/Makefile os2/include/sys/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 tools/Makefile \
- tests/Makefile Docs/Makefile support-files/Makefile \
- mysql-test/Makefile \
- include/mysql_version.h
+AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
+ strings/Makefile regex/Makefile heap/Makefile dnl
+ bdb/Makefile dnl
+ myisam/Makefile myisammrg/Makefile dnl
+ os2/Makefile os2/include/Makefile os2/include/sys/Makefile dnl
+ man/Makefile BUILD/Makefile readline/Makefile vio/Makefile dnl
+ libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile dnl
+ libmysql/Makefile client/Makefile dnl
+ pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl
+ merge/Makefile dbug/Makefile scripts/Makefile dnl
+ include/Makefile sql-bench/Makefile tools/Makefile dnl
+ tests/Makefile Docs/Makefile support-files/Makefile dnl
+ mysql-test/Makefile dnl
+ netware/Makefile dnl
+ include/mysql_version.h dnl
, , [
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
])