diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 222 |
1 files changed, 200 insertions, 22 deletions
diff --git a/configure.in b/configure.in index 212737535a6..409bd166a8a 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 @@ -856,6 +891,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> @@ -876,6 +916,8 @@ int main() } ], AC_DEFINE(HAVE_INT_8_16_32) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) ) + ;; +esac # # Some system specific hacks @@ -1025,6 +1067,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 @@ -1392,7 +1535,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++ @@ -1417,6 +1565,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], @@ -1564,6 +1719,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 @@ -1571,6 +1727,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 ###################################################################### @@ -2035,6 +2192,16 @@ then AC_MSG_ERROR([You can not use --with-readline and --with-libedit at the same time, please choose one of it]) fi +readline_topdir="" +readline_basedir="" +readline_dir="" +readline_h_ln_cmd="" +readline_link="" + +if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then + # For NetWare, do not need readline + echo "Skipping readline" +else mkdir include/readline if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"] @@ -2064,10 +2231,7 @@ else else readline_link="-ledit" fi - readline_topdir="" - readline_basedir="" - readline_dir="" - readline_h_ln_cmd="" +fi fi AC_SUBST(readline_dir) @@ -2108,6 +2272,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 @@ -2289,11 +2460,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) @@ -2397,7 +2575,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" @@ -2471,20 +2649,20 @@ then AC_OUTPUT(cmd-line-utils/Makefile) fi -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 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 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 + include/mysql_version.h dnl , , [ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ]) |