summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-28 08:38:28 +0200
committermonty@mashka.mysql.fi <>2003-01-28 08:38:28 +0200
commit689578a0997f54c590bcf4791e30710602851bc4 (patch)
treeb916d4acfbe4f32ab06b052fd06c072f858bdce1 /configure.in
parent1bdd1d0626fdb8f858a3c4bf82e0064ee19b042d (diff)
downloadmariadb-git-689578a0997f54c590bcf4791e30710602851bc4.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
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
])