configure
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:301k
- rm -fr conftest*
- fi
- fi
- echo "$ac_t""$ac_cv_fp_except" 1>&6
- if test "$ac_cv_fp_except" = "yes"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_FP_EXCEPT 1
- EOF
- fi
- # Do the c++ compiler have a bool type
- echo $ac_n "checking if ${CXX} supports bool types""... $ac_c" 1>&6
- echo "configure:7360: checking if ${CXX} supports bool types" >&5
- if eval "test "`echo '$''{'mysql_cv_have_bool'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- ac_ext=C
- # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
- #line 7374 "configure"
- #include "confdefs.h"
- int main() {
- bool b = true;
- ; return 0; }
- EOF
- if { (eval echo configure:7381: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_have_bool=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_have_bool=no
- fi
- rm -f conftest*
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- fi
- echo "$ac_t""$mysql_cv_have_bool" 1>&6
- if test "$mysql_cv_have_bool" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_BOOL 1
- EOF
- fi
- # Check some common bugs with gcc 2.8.# on sparc
- echo $ac_n "checking if conversion of longlong to float works""... $ac_c" 1>&6
- echo "configure:7412: checking if conversion of longlong to float works" >&5
- if eval "test "`echo '$''{'ac_cv_conv_longlong_to_float'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 7420 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- typedef long long longlong;
- main()
- {
- longlong ll=1;
- float f;
- FILE *file=fopen("conftestval", "w");
- f = (float) ll;
- fprintf(file,"%gn",f);
- close(file);
- exit (0);
- }
- EOF
- if { (eval echo configure:7435: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_conv_longlong_to_float=`cat conftestval`
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_conv_longlong_to_float=0
- fi
- rm -fr conftest*
- fi
- fi
- if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
- then
- ac_cv_conv_longlong_to_float=yes
- else
- ac_cv_conv_longlong_to_float=no
- fi
- echo "$ac_t""$ac_cv_conv_longlong_to_float" 1>&6
- if test "$ac_cv_conv_longlong_to_float" != "yes"
- then
- { echo "configure: error: Your compiler can't convert a longlong value to a float!
- If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
- again" 1>&2; exit 1; };
- fi
- ######################################################################
- # For readline-4.0 (We simply move the mimimum amount of stuff from
- # the readline configure.in here)
- MAKE_SHELL=/bin/sh
- # Already-done: stdlib.h string.h unistd.h termios.h
- for ac_hdr in varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h
- sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h
- sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h
- paths.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:7478: checking for $ac_hdr" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7483 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:7488: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- # Already-done: strcasecmp
- for ac_func in lstat putenv select setenv setlocale strcoll tcgetattr
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:7519: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7524 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:7547: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
- echo "configure:7573: checking whether stat file-mode macros are broken" >&5
- if eval "test "`echo '$''{'ac_cv_header_stat_broken'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7578 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- #if defined(S_ISBLK) && defined(S_IFDIR)
- # if S_ISBLK (S_IFDIR)
- You lose.
- # endif
- #endif
- #if defined(S_ISBLK) && defined(S_IFCHR)
- # if S_ISBLK (S_IFCHR)
- You lose.
- # endif
- #endif
- #if defined(S_ISLNK) && defined(S_IFREG)
- # if S_ISLNK (S_IFREG)
- You lose.
- # endif
- #endif
- #if defined(S_ISSOCK) && defined(S_IFREG)
- # if S_ISSOCK (S_IFREG)
- You lose.
- # endif
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "You lose" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_header_stat_broken=yes
- else
- rm -rf conftest*
- ac_cv_header_stat_broken=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
- if test $ac_cv_header_stat_broken = yes; then
- cat >> confdefs.h <<EOF
- #define STAT_MACROS_BROKEN 1
- EOF
- fi
- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
- echo "configure:7629: checking return type of signal handlers" >&5
- if eval "test "`echo '$''{'ac_cv_type_signal'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7634 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #ifdef signal
- #undef signal
- #endif
- #ifdef __cplusplus
- extern "C" void (*signal (int, void (*)(int)))(int);
- #else
- void (*signal ()) ();
- #endif
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:7651: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_signal" 1>&6
- cat >> confdefs.h <<EOF
- #define RETSIGTYPE $ac_cv_type_signal
- EOF
- echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
- echo "configure:7671: checking for type of signal functions" >&5
- if eval "test "`echo '$''{'mysql_cv_signal_vintage'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 7677 "configure"
- #include "confdefs.h"
- #include <signal.h>
- int main() {
- sigset_t ss;
- struct sigaction sa;
- sigemptyset(&ss); sigsuspend(&ss);
- sigaction(SIGINT, &sa, (struct sigaction *) 0);
- sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
-
- ; return 0; }
- EOF
- if { (eval echo configure:7690: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_signal_vintage=posix
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cat > conftest.$ac_ext <<EOF
- #line 7699 "configure"
- #include "confdefs.h"
- #include <signal.h>
- int main() {
- int mask = sigmask(SIGINT);
- sigsetmask(mask); sigblock(mask); sigpause(mask);
-
- ; return 0; }
- EOF
- if { (eval echo configure:7709: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_signal_vintage=4.2bsd
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
-
- cat > conftest.$ac_ext <<EOF
- #line 7718 "configure"
- #include "confdefs.h"
- #include <signal.h>
- RETSIGTYPE foo() { }
- int main() {
- int mask = sigmask(SIGINT);
- sigset(SIGINT, foo); sigrelse(SIGINT);
- sighold(SIGINT); sigpause(SIGINT);
-
- ; return 0; }
- EOF
- if { (eval echo configure:7731: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_signal_vintage=svr3
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_signal_vintage=v7
-
- fi
- rm -f conftest*
-
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_signal_vintage" 1>&6
- if test "$mysql_cv_signal_vintage" = posix; then
- cat >> confdefs.h <<EOF
- #define HAVE_POSIX_SIGNALS 1
- EOF
- elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
- cat >> confdefs.h <<EOF
- #define HAVE_BSD_SIGNALS 1
- EOF
- elif test "$mysql_cv_signal_vintage" = svr3; then
- cat >> confdefs.h <<EOF
- #define HAVE_USG_SIGHOLD 1
- EOF
- fi
- echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
- echo "configure:7770: checking whether programs are able to redeclare getpw functions" >&5
- if eval "test "`echo '$''{'mysql_cv_can_redecl_getpw'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7775 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <pwd.h>
- extern struct passwd *getpwent();
- int main() {
- struct passwd *z; z = getpwent();
- ; return 0; }
- EOF
- if { (eval echo configure:7784: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_can_redecl_getpw=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_can_redecl_getpw=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_can_redecl_getpw" 1>&6
- if test $mysql_cv_can_redecl_getpw = no; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPW_DECLS 1
- EOF
- fi
- echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
- echo "configure:7805: checking for TIOCGWINSZ in sys/ioctl.h" >&5
- if eval "test "`echo '$''{'mysql_cv_tiocgwinsz_in_ioctl'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7810 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/ioctl.h>
- int main() {
- int x = TIOCGWINSZ;
- ; return 0; }
- EOF
- if { (eval echo configure:7818: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_tiocgwinsz_in_ioctl=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_tiocgwinsz_in_ioctl=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_tiocgwinsz_in_ioctl" 1>&6
- if test $mysql_cv_tiocgwinsz_in_ioctl = yes; then
- cat >> confdefs.h <<EOF
- #define GWINSZ_IN_SYS_IOCTL 1
- EOF
- fi
- echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
- echo "configure:7839: checking for FIONREAD in sys/ioctl.h" >&5
- if eval "test "`echo '$''{'mysql_cv_fionread_in_ioctl'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7844 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/ioctl.h>
- int main() {
- int x = FIONREAD;
- ; return 0; }
- EOF
- if { (eval echo configure:7852: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_fionread_in_ioctl=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_fionread_in_ioctl=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_fionread_in_ioctl" 1>&6
- if test $mysql_cv_fionread_in_ioctl = yes; then
- cat >> confdefs.h <<EOF
- #define FIONREAD_IN_SYS_IOCTL 1
- EOF
- fi
- echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
- echo "configure:7873: checking for TIOCSTAT in sys/ioctl.h" >&5
- if eval "test "`echo '$''{'mysql_cv_tiocstat_in_ioctl'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7878 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/ioctl.h>
- int main() {
- int x = TIOCSTAT;
- ; return 0; }
- EOF
- if { (eval echo configure:7886: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_tiocstat_in_ioctl=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_tiocstat_in_ioctl=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_tiocstat_in_ioctl" 1>&6
- if test $mysql_cv_tiocstat_in_ioctl = yes; then
- cat >> confdefs.h <<EOF
- #define TIOCSTAT_IN_SYS_IOCTL 1
- EOF
- fi
- echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
- echo "configure:7908: checking if struct dirent has a d_ino member" >&5
- if eval "test "`echo '$''{'mysql_cv_dirent_has_dino'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7913 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <sys/types.h>
- #ifdef HAVE_UNISTD_H
- # include <unistd.h>
- #endif /* HAVE_UNISTD_H */
- #if defined(HAVE_DIRENT_H)
- # include <dirent.h>
- #else
- # define dirent direct
- # ifdef HAVE_SYS_NDIR_H
- # include <sys/ndir.h>
- # endif /* SYSNDIR */
- # ifdef HAVE_SYS_DIR_H
- # include <sys/dir.h>
- # endif /* SYSDIR */
- # ifdef HAVE_NDIR_H
- # include <ndir.h>
- # endif
- #endif /* HAVE_DIRENT_H */
- int main() {
- struct dirent d; int z; z = d.d_ino;
- ; return 0; }
- EOF
- if { (eval echo configure:7942: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_dirent_has_dino=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_dirent_has_dino=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_dirent_has_dino" 1>&6
- if test $mysql_cv_dirent_has_dino = yes; then
- cat >> confdefs.h <<EOF
- #define STRUCT_DIRENT_HAS_D_INO 1
- EOF
- fi
- echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
- echo "configure:7963: checking whether signal handlers are of type void" >&5
- if eval "test "`echo '$''{'mysql_cv_void_sighandler'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 7968 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #ifdef signal
- #undef signal
- #endif
- #ifdef __cplusplus
- extern "C"
- #endif
- void (*signal ()) ();
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:7983: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_void_sighandler=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_void_sighandler=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_void_sighandler" 1>&6
- if test $mysql_cv_void_sighandler = yes; then
- cat >> confdefs.h <<EOF
- #define VOID_SIGHANDLER 1
- EOF
- fi
- if test "$with_named_curses" = "no"
- then
-
- if eval "test "`echo '$''{'mysql_cv_termcap_lib'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
- echo "configure:8009: checking for tgetent in -lncurses" >&5
- ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lncurses $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8017 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgetent();
- int main() {
- tgetent()
- ; return 0; }
- EOF
- if { (eval echo configure:8028: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- mysql_cv_termcap_lib=libncurses
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
- echo "configure:8047: checking for tgetent in -lcurses" >&5
- ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lcurses $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8055 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgetent();
- int main() {
- tgetent()
- ; return 0; }
- EOF
- if { (eval echo configure:8066: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- mysql_cv_termcap_lib=libcurses
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
- echo "configure:8085: checking for tgetent in -ltermcap" >&5
- ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ltermcap $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8093 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char tgetent();
- int main() {
- tgetent()
- ; return 0; }
- EOF
- if { (eval echo configure:8104: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- mysql_cv_termcap_lib=libtermcap
- else
- echo "$ac_t""no" 1>&6
- mysql_cv_termcap_lib=NOT_FOUND
- fi
- fi
- fi
- fi
- echo $ac_n "checking for termcap functions library""... $ac_c" 1>&6
- echo "configure:8132: checking for termcap functions library" >&5
- if test $mysql_cv_termcap_lib = NOT_FOUND; then
- { echo "configure: error: No curses/termcap library found" 1>&2; exit 1; }
- elif test $mysql_cv_termcap_lib = libtermcap; then
- TERMCAP_LIB=-ltermcap
- elif test $mysql_cv_termcap_lib = libncurses; then
- TERMCAP_LIB=-lncurses
- else
- TERMCAP_LIB=-lcurses
- fi
- echo "$ac_t""$TERMCAP_LIB" 1>&6
- else
- TERMCAP_LIB="$with_named_curses"
- fi
- # End of readline stuff
- #########################################################################
- for ac_hdr in unistd.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:8156: checking for $ac_hdr" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8161 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:8166: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in getpagesize
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:8195: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8200 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8223: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking for working mmap""... $ac_c" 1>&6
- echo "configure:8248: checking for working mmap" >&5
- if eval "test "`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 8256 "configure"
- #include "confdefs.h"
- /* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
- #include <sys/types.h>
- #include <fcntl.h>
- #include <sys/mman.h>
- /* This mess was copied from the GNU getpagesize.h. */
- #ifndef HAVE_GETPAGESIZE
- # ifdef HAVE_UNISTD_H
- # include <unistd.h>
- # endif
- /* Assume that all systems that can run configure have sys/param.h. */
- # ifndef HAVE_SYS_PARAM_H
- # define HAVE_SYS_PARAM_H 1
- # endif
- # ifdef _SC_PAGESIZE
- # define getpagesize() sysconf(_SC_PAGESIZE)
- # else /* no _SC_PAGESIZE */
- # ifdef HAVE_SYS_PARAM_H
- # include <sys/param.h>
- # ifdef EXEC_PAGESIZE
- # define getpagesize() EXEC_PAGESIZE
- # else /* no EXEC_PAGESIZE */
- # ifdef NBPG
- # define getpagesize() NBPG * CLSIZE
- # ifndef CLSIZE
- # define CLSIZE 1
- # endif /* no CLSIZE */
- # else /* no NBPG */
- # ifdef NBPC
- # define getpagesize() NBPC
- # else /* no NBPC */
- # ifdef PAGESIZE
- # define getpagesize() PAGESIZE
- # endif /* PAGESIZE */
- # endif /* no NBPC */
- # endif /* no NBPG */
- # endif /* no EXEC_PAGESIZE */
- # else /* no HAVE_SYS_PARAM_H */
- # define getpagesize() 8192 /* punt totally */
- # endif /* no HAVE_SYS_PARAM_H */
- # endif /* no _SC_PAGESIZE */
- #endif /* no HAVE_GETPAGESIZE */
- #ifdef __cplusplus
- extern "C" { void *malloc(unsigned); }
- #else
- char *malloc();
- #endif
- int
- main()
- {
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
- pagesize = getpagesize();
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
- }
- EOF
- if { (eval echo configure:8396: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_func_mmap_fixed_mapped=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
- fi
- rm -fr conftest*
- fi
- fi
- echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
- if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_MMAP 1
- EOF
- fi
- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
- echo "configure:8419: checking return type of signal handlers" >&5
- if eval "test "`echo '$''{'ac_cv_type_signal'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8424 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #ifdef signal
- #undef signal
- #endif
- #ifdef __cplusplus
- extern "C" void (*signal (int, void (*)(int)))(int);
- #else
- void (*signal ()) ();
- #endif
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:8441: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_signal" 1>&6
- cat >> confdefs.h <<EOF
- #define RETSIGTYPE $ac_cv_type_signal
- EOF
- echo $ac_n "checking return type of qsort""... $ac_c" 1>&6
- echo "configure:8460: checking return type of qsort" >&5
- if eval "test "`echo '$''{'mysql_cv_type_qsort'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8465 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #ifdef __cplusplus
- extern "C"
- #endif
- void qsort(void *base, size_t nel, size_t width,
- int (*compar) (const void *, const void *));
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:8478: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_type_qsort=void
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_type_qsort=int
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_type_qsort" 1>&6
- cat >> confdefs.h <<EOF
- #define RETQSORTTYPE $mysql_cv_type_qsort
- EOF
- if test "$mysql_cv_type_qsort" = "void"
- then
- cat >> confdefs.h <<EOF
- #define QSORT_TYPE_IS_VOID 1
- EOF
- fi
- echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
- echo "configure:8504: checking whether utime accepts a null argument" >&5
- if eval "test "`echo '$''{'ac_cv_func_utime_null'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- rm -f conftestdata; > conftestdata
- # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
- if test "$cross_compiling" = yes; then
- ac_cv_func_utime_null=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 8514 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- main() {
- struct stat s, t;
- exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
- && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
- && t.st_mtime - s.st_mtime < 120));
- }
- EOF
- if { (eval echo configure:8525: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_func_utime_null=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_utime_null=no
- fi
- rm -fr conftest*
- fi
- rm -f core core.* *.core
- fi
- echo "$ac_t""$ac_cv_func_utime_null" 1>&6
- if test $ac_cv_func_utime_null = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_UTIME_NULL 1
- EOF
- fi
- echo $ac_n "checking for vprintf""... $ac_c" 1>&6
- echo "configure:8549: checking for vprintf" >&5
- if eval "test "`echo '$''{'ac_cv_func_vprintf'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8554 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vprintf(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char vprintf();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_vprintf) || defined (__stub___vprintf)
- choke me
- #else
- vprintf();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8577: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_vprintf=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vprintf=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'vprintf`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_VPRINTF 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- if test "$ac_cv_func_vprintf" != yes; then
- echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
- echo "configure:8601: checking for _doprnt" >&5
- if eval "test "`echo '$''{'ac_cv_func__doprnt'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8606 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char _doprnt();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub__doprnt) || defined (__stub____doprnt)
- choke me
- #else
- _doprnt();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8629: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func__doprnt=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func__doprnt=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'_doprnt`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_DOPRNT 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- for ac_func in alarm bmove
- chsize ftruncate rint finite fpsetmask fpresetsticky
- cuserid fcntl fconvert poll
- getrusage getpwuid getcwd getrlimit getwd index stpcpy locking longjmp
- perror pread realpath readlink rename
- socket strnlen madvise mkstemp
- strtol strtoul strtoull snprintf tempnam thr_setconcurrency
- gethostbyaddr_r gethostbyname_r getpwnam
- bfill bzero bcmp strstr strpbrk strerror
- tell atod memcpy memmove
- setupterm strcasecmp sighold vidattr lrand48 localtime_r
- sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np
- pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam
- pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize
- pthread_condattr_create rwlock_init pthread_rwlock_rdlock
- dlopen dlerror fchmod getpass getpassphrase initgroups mlockall
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:8671: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8676 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8699: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- # Sanity check: We chould not have any fseeko symbol unless
- # large_file_support=yes
- for ac_func in fseeko
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:8729: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8734 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8757: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
- if test "$large_file_support" = no -a "$IS_LINUX" = "true";
- then
- { echo "configure: error: "Found fseeko symbol but large_file_support is not enabled!"" 1>&2; exit 1; };
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- # Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
- ac_save_CXXFLAGS="$CXXFLAGS"
- echo $ac_n "checking style of gethost* routines""... $ac_c" 1>&6
- echo "configure:8789: checking style of gethost* routines" >&5
- if eval "test "`echo '$''{'mysql_cv_gethost_style'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- ac_ext=C
- # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cxx_cross
- if test "$ac_cv_prog_gxx" = "yes"
- then
- CXXFLAGS="$CXXFLAGS -Werror"
- fi
- cat > conftest.$ac_ext <<EOF
- #line 8806 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #include <pthread.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
- int main() {
- int skr;
- struct hostent *foo = gethostbyaddr_r((const char *) 0,
- 0, 0, (struct hostent *) 0, (char *) NULL, 0, &skr); return (foo == 0);
- ; return 0; }
- EOF
- if { (eval echo configure:8823: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_gethost_style=solaris
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_gethost_style=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_gethost_style" 1>&6
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- CXXFLAGS="$ac_save_CXXFLAGS"
- if test "$mysql_cv_gethost_style" = "solaris"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_SOLARIS_STYLE_GETHOST 1
- EOF
- fi
- #---START: Used in for client configure
- # Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris)
- ac_save_CXXFLAGS="$CXXFLAGS"
- echo $ac_n "checking style of gethostname_r routines""... $ac_c" 1>&6
- echo "configure:8857: checking style of gethostname_r routines" >&5
- if eval "test "`echo '$''{'mysql_cv_gethostname_style'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- ac_ext=C
- # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cxx_cross
- if test "$ac_cv_prog_gxx" = "yes"
- then
- CXXFLAGS="$CXXFLAGS -Werror"
- fi
- cat > conftest.$ac_ext <<EOF
- #line 8874 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #include <pthread.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
- int main() {
- int skr;
- skr = gethostbyname_r((const char *) 0,
- (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);
- ; return 0; }
- EOF
- if { (eval echo configure:8892: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_gethostname_style=glibc2
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_gethostname_style=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_gethostname_style" 1>&6
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- CXXFLAGS="$ac_save_CXXFLAGS"
- if test "$mysql_cv_gethostname_style" = "glibc2"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
- EOF
- fi
- # Check 3rd argument of getthostbyname_r
- ac_save_CXXFLAGS="$CXXFLAGS"
- echo $ac_n "checking 3 argument to gethostname_r routines""... $ac_c" 1>&6
- echo "configure:8924: checking 3 argument to gethostname_r routines" >&5
- if eval "test "`echo '$''{'mysql_cv_gethostname_arg'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- ac_ext=C
- # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cxx_cross
- if test "$ac_cv_prog_gxx" = "yes"
- then
- CXXFLAGS="$CXXFLAGS -Werror"
- fi
- cat > conftest.$ac_ext <<EOF
- #line 8941 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #include <pthread.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
- int main() {
- int skr;
- skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (hostent_data*) 0);
- ; return 0; }
- EOF
- if { (eval echo configure:8958: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_gethostname_arg=hostent_data
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_gethostname_arg=char
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_gethostname_arg" 1>&6
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- CXXFLAGS="$ac_save_CXXFLAGS"
- if test "$mysql_cv_gethostname_arg" = "hostent_data"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R_RETURN_INT 1
- EOF
- fi
- if test "$with_mit_threads" = "no"
- then
- # Check definition of pthread_getspecific
- echo $ac_n "checking "args to pthread_getspecific"""... $ac_c" 1>&6
- echo "configure:8992: checking "args to pthread_getspecific"" >&5
- if eval "test "`echo '$''{'mysql_cv_getspecific_args'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8997 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- int main() {
- void *pthread_getspecific(pthread_key_t key);
- pthread_getspecific((pthread_key_t) NULL);
- ; return 0; }
- EOF
- if { (eval echo configure:9009: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_getspecific_args=POSIX
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_getspecific_args=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_getspecific_args" 1>&6
- if test "$mysql_cv_getspecific_args" = "other"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_NONPOSIX_PTHREAD_GETSPECIFIC 1
- EOF
- fi
- # Check definition of pthread_mutex_init
- echo $ac_n "checking "args to pthread_mutex_init"""... $ac_c" 1>&6
- echo "configure:9032: checking "args to pthread_mutex_init"" >&5
- if eval "test "`echo '$''{'mysql_cv_mutex_init_args'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 9037 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- int main() {
-
- pthread_mutexattr_t attr;
- pthread_mutex_t mp;
- pthread_mutex_init(&mp,&attr);
- ; return 0; }
- EOF
- if { (eval echo configure:9051: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- mysql_cv_mutex_init_args=POSIX
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_mutex_init_args=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_mutex_init_args" 1>&6
- if test "$mysql_cv_mutex_init_args" = "other"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_NONPOSIX_PTHREAD_MUTEX_INIT 1
- EOF
- fi
- fi
- #---END:
- #---START: Used in for client configure
- # Check definition of readdir_r
- echo $ac_n "checking "args to readdir_r"""... $ac_c" 1>&6
- echo "configure:9077: checking "args to readdir_r"" >&5
- if eval "test "`echo '$''{'mysql_cv_readdir_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 9082 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- #include <dirent.h>
- int main() {
- int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
- readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL);
- ; return 0; }
- EOF
- if { (eval echo configure:9095: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_readdir_r=POSIX
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_readdir_r=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_readdir_r" 1>&6
- if test "$mysql_cv_readdir_r" = "POSIX"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_READDIR_R 1
- EOF
- fi
- # Check definition av posix sigwait()
- echo $ac_n "checking "style of sigwait"""... $ac_c" 1>&6
- echo "configure:9118: checking "style of sigwait"" >&5
- if eval "test "`echo '$''{'mysql_cv_sigwait'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 9123 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- #include <signal.h>
- int main() {
- #ifndef _AIX
- sigset_t set;
- int sig;
- sigwait(&set,&sig);
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9139: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_sigwait=POSIX
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_sigwait=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_sigwait" 1>&6
- if test "$mysql_cv_sigwait" = "POSIX"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_SIGWAIT 1
- EOF
- fi
- if test "$mysql_cv_sigwait" != "POSIX"
- then
- unset mysql_cv_sigwait
- # Check definition av posix sigwait()
- echo $ac_n "checking "style of sigwait"""... $ac_c" 1>&6
- echo "configure:9165: checking "style of sigwait"" >&5
- if eval "test "`echo '$''{'mysql_cv_sigwait'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 9170 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- #include <signal.h>
- int main() {
- sigset_t set;
- int sig;
- sigwait(&set);
- ; return 0; }
- EOF
- if { (eval echo configure:9184: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_sigwait=NONPOSIX
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_sigwait=other
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_sigwait" 1>&6
- if test "$mysql_cv_sigwait" = "NONPOSIX"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_NONPOSIX_SIGWAIT 1
- EOF
- fi
- fi
- #---END:
- # Check if pthread_attr_setscope() exists
- echo $ac_n "checking "for pthread_attr_setscope"""... $ac_c" 1>&6
- echo "configure:9209: checking "for pthread_attr_setscope"" >&5
- if eval "test "`echo '$''{'mysql_cv_pthread_attr_setscope'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 9214 "configure"
- #include "confdefs.h"
- #if !defined(SCO) && !defined(__osf__)
- #define _REENTRANT
- #endif
- #define _POSIX_PTHREAD_SEMANTICS
- #include <pthread.h>
- int main() {
- pthread_attr_t thr_attr;
- pthread_attr_setscope(&thr_attr,0);
- ; return 0; }
- EOF
- if { (eval echo configure:9226: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- mysql_cv_pthread_attr_setscope=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- mysql_cv_pthread_attr_setscope=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$mysql_cv_pthread_attr_setscope" 1>&6
- if test "$mysql_cv_pthread_attr_setscope" = "yes"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_PTHREAD_ATTR_SETSCOPE 1
- EOF
- fi
- # Check for bad includes
- echo $ac_n "checking "can netinet files be included"""... $ac_c" 1>&6
- echo "configure:9249: checking "can netinet files be included"" >&5
- cat > conftest.$ac_ext <<EOF
- #line 9251 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <netinet/tcp.h>
- int main() {
- printf("1n");
- ; return 0; }
- EOF
- if { (eval echo configure:9263: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- netinet_inc=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- netinet_inc=no
- fi
- rm -f conftest*
- if test "$netinet_inc" = "no"
- then
- cat >> confdefs.h <<EOF
- #define HAVE_BROKEN_NETINET_INCLUDES 1
- EOF
- fi
- echo "$ac_t"""$netinet_inc"" 1>&6
- # Only build client code?
- # Check whether --with-server or --without-server was given.
- if test "${with_server+set}" = set; then
- withval="$with_server"
- with_server=$withval
- else
- with_server=yes
- fi
- # Shall we build the docs?
- # Check whether --with-docs or --without-docs was given.
- if test "${with_docs+set}" = set; then
- withval="$with_docs"
- with_docs=$withval
- else
- with_docs=yes
- fi
- if test "$with_docs" = "yes"
- then
- docs_dirs="Docs"
- else
- docs_dirs=""
- fi
- # Shall we build the bench code?
- # Check whether --with-bench or --without-bench was given.
- if test "${with_bench+set}" = set; then
- withval="$with_bench"
- with_bench=$withval
- else
- with_bench=yes
- fi
- if test "$with_bench" = "yes"
- then
- bench_dirs="sql-bench mysql-test"
- else
- bench_dirs=""
- fi
- # Don't build readline, i have it already
- # Check whether --with-readline or --without-readline was given.
- if test "${with_readline+set}" = set; then
- withval="$with_readline"
- with_readline=$withval
- else
- with_readline=yes
-
- fi
- if test "$with_readline" = "yes"
- then
- readline_dir="readline"
- readline_link="../readline/libreadline.a"
- else
- # This requires readline to be in a standard place. Mosty for linux
- # there readline may be a shared library.
- readline_dir=""
- readline_link="-lreadline"
- fi
- # Choose a character set
- CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 latin5 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
- DEFAULT_CHARSET=latin1
- # Check whether --with-charset or --without-charset was given.
- if test "${with_charset+set}" = set; then
- withval="$with_charset"
- default_charset="$withval"
- else
- default_charset="$DEFAULT_CHARSET"
- fi
- # Check whether --with-extra-charsets or --without-extra-charsets was given.
- if test "${with_extra_charsets+set}" = set; then
- withval="$with_extra_charsets"
- extra_charsets="$withval"
- else
- extra_charsets="none"
- fi
- echo $ac_n "checking "character sets"""... $ac_c" 1>&6
- echo "configure:9378: checking "character sets"" >&5
- if test "$extra_charsets" = none; then
- CHARSETS=""
- elif test "$extra_charsets" = complex; then
- CHARSETS=`/bin/ls -1 $srcdir/strings/ctype-*.c |
- sed -e 's;^.*/ctype-;;' -e 's;.c$;;'`
- CHARSETS=`echo $CHARSETS` # get rid of line breaks
- else
- if test "$extra_charsets" = all; then
- CHARSETS="$CHARSETS_AVAILABLE"
- else
- CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
- fi
- fi
- # Ensure that the default_charset is first in CHARSETS
- TMP_CHARSETS="$default_charset "
- for i in $CHARSETS
- do
- if test $i != $default_charset
- then
- TMP_CHARSETS="$TMP_CHARSETS $i"
- fi
- done
- CHARSETS=$TMP_CHARSETS
- # Check if charsets are all good
- for cs in $CHARSETS
- do
- charset_okay=0
- for charset in $CHARSETS_AVAILABLE
- do
- if test $cs = $charset; then charset_okay=1; fi
- done
- if test $charset_okay = 0;
- then
- { echo "configure: error: Charset $cs not available. (Available $CHARSETS_AVAILABLE).
- See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
- fi
- done
-
- CHARSET_SRCS=""
- CHARSETS_NEED_SOURCE=""
- CHARSET_DECLARATIONS=""
- CHARSET_COMP_CS_INIT="CHARSET_INFO compiled_charsets[] = {"
- want_use_strcoll=0
- want_use_mb=0
- index_file="$srcdir/sql/share/charsets/Index"
- for c in $CHARSETS
- do
- # get the charset number from $index_file
- subpat='^'"${c}"'[ ][ ]*([0-9][0-9]*)[^0-9]*$'
- number=`sed -e "/$subpat/!d" -e 's//1/' $index_file`
- # some sanity checking....
- if test X"$number" = X
- then
- { echo "configure: error: No number was found in $index_file for the $c character set. This is a bug in the MySQL distribution. Please report this message to bugs@lists.mysql.com." 1>&2; exit 1; }
- fi
- cs_file="$srcdir/strings/ctype-$c.c"
- if test -f $cs_file
- then
- CHARSET_SRCS="${CHARSET_SRCS}ctype-$c.c "
- # get the strxfrm multiplier and max mb len from files
- subpat='^.*\.configure\. strxfrm_multiply_'"${c}"'='
- strx=`$AWK 'sub("'"$subpat"'", "") { print }' $cs_file`
- subpat='^.*\.configure\. mbmaxlen_'"${c}"'='
- maxl=`$AWK 'sub("'"$subpat"'", "") { print }' $cs_file`
- CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS
- /* declarations for the ${c} character set, filled in by configure */
- extern uchar ctype_${c}[], to_lower_${c}[], to_upper_${c}[], sort_order_${c}[];"
- else
- CHARSETS_NEED_SOURCE="$CHARSETS_NEED_SOURCE $c"
- strx=''
- maxl=''
- fi
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- /* this information is filled in by configure */
- {
- $number, /* number */
- "$c", /* name */
- ctype_${c},
- to_lower_${c},
- to_upper_${c},
- sort_order_${c},"
- if test -n "$strx"
- then
- want_use_strcoll=1
- CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS
- extern int my_strcoll_${c}(const uchar *, const uchar *);
- extern int my_strxfrm_${c}(uchar *, const uchar *, int);
- extern int my_strnncoll_${c}(const uchar *, int, const uchar *, int);
- extern int my_strnxfrm_${c}(uchar *, const uchar *, int, int);
- extern my_bool my_like_range_${c}(const char *, uint, pchar, uint,
- char *, char *, uint *, uint *);"
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- $strx, /* strxfrm_multiply */
- my_strcoll_${c},
- my_strxfrm_${c},
- my_strnncoll_${c},
- my_strnxfrm_${c},
- my_like_range_${c},"
- else
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- 0, /* strxfrm_multiply */
- NULL, /* strcoll */
- NULL, /* strxfrm */
- NULL, /* strnncoll */
- NULL, /* strnxfrm */
- NULL, /* like_range */"
- fi
- if test -n "$maxl"
- then
- want_use_mb=1
- CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS
- extern int ismbchar_${c}(const char *, const char *);
- extern my_bool ismbhead_${c}(uint);
- extern int mbcharlen_${c}(uint);"
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- $maxl, /* mbmaxlen */
- ismbchar_${c},
- ismbhead_${c},
- mbcharlen_${c}"
- else
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- 0, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL /* mbcharlen */"
- fi
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- },"
- done
- CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
- /* this information is filled in by configure */
- {
- 0, /* end-of-list marker */
- NullS,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- NULL,
- NULL,
- NULL
- }
- };"
- if test $want_use_strcoll = 1
- then
- cat >> confdefs.h <<EOF
- #define USE_STRCOLL 1
- EOF
- fi
- if test $want_use_mb = 1
- then
- cat >> confdefs.h <<EOF
- #define USE_MB 1
- EOF
- cat >> confdefs.h <<EOF
- #define USE_MB_IDENT 1
- EOF
- fi
- CHARSET_OBJS="`echo "$CHARSET_SRCS" | sed -e 's/.c /.o /g'`"
- cat <<EOF > $srcdir/strings/ctype_autoconf.c
- /* This file is generated automatically by configure. */$CHARSET_DECLARATIONS
- $CHARSET_COMP_CS_INIT
- EOF
- echo "$ac_t""default: $default_charset; compiled in: $CHARSETS" 1>&6
- # Check whether --with-berkeley-db or --without-berkeley-db was given.
- if test "${with_berkeley_db+set}" = set; then
- withval="$with_berkeley_db"
- bdb="$withval"
- else
- bdb=no
- fi
- # Check whether --with-berkeley-db-includes or --without-berkeley-db-includes was given.
- if test "${with_berkeley_db_includes+set}" = set; then
- withval="$with_berkeley_db_includes"
- bdb_includes="$withval"
- else
- bdb_includes=default
- fi
- # Check whether --with-berkeley-db-libs or --without-berkeley-db-libs was given.
- if test "${with_berkeley_db_libs+set}" = set; then
- withval="$with_berkeley_db_libs"
- bdb_libs="$withval"
- else
- bdb_libs=default
- fi
- echo $ac_n "checking for BerkeleyDB""... $ac_c" 1>&6
- echo "configure:9616: checking for BerkeleyDB" >&5
- have_berkeley_db=no
- case "$bdb" in
- no )
- mode=no
- echo "$ac_t""no" 1>&6
- ;;
- yes | default )
- case "$bdb_includes---$bdb_libs" in
- default---default )
- mode=search-$bdb
- echo "$ac_t""searching..." 1>&6
- ;;
- default---* | *---default | yes---* | *---yes )
- { echo "configure: error: if either 'includes' or 'libs' is specified, both must be specified" 1>&2; exit 1; }
- ;;
- * )
- mode=supplied-two
- echo "$ac_t""supplied" 1>&6
- ;;
- esac
- ;;
- * )
- mode=supplied-one
- echo "$ac_t""supplied" 1>&6
- ;;
- esac
- case $mode in
- no )
- bdb_includes=
- bdb_libs=
- ;;
- supplied-two )
-
- inc="$bdb_includes"
- lib="$bdb_libs"
- if test -f "$inc/db.h"
- then
-
- db_major=`sed -e '/^.*#define[ ]*DB_VERSION_MAJOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_minor=`sed -e '/^.*#define[ ]*DB_VERSION_MINOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_patch=`sed -e '/^.*#define[ ]*DB_VERSION_PATCH[ ][ ]*/ !d' -e 's///' $inc/db.h`
- test -z "$db_major" && db_major=0
- test -z "$db_minor" && db_minor=0
- 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: " $inc/db.h > /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
- if test X"$bdb_version_ok" = Xyes; then
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L$lib $LDFLAGS"
- echo $ac_n "checking for db_env_create in -ldb""... $ac_c" 1>&6
- echo "configure:9690: checking for db_env_create in -ldb" >&5
- ac_lib_var=`echo db'_'db_env_create | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldb $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 9698 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char db_env_create();
- int main() {
- db_env_create()
- ; return 0; }
- EOF
- if { (eval echo configure:9709: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- bdb_dir_ok=installed
-
- case "$inc" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- inc="$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$inc" != "/"
- then
- inc=`echo $inc | sed -e 's,/$,,'`
- fi
-
- case "$lib" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- lib="$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$lib" != "/"
- then
- lib=`echo $lib | sed -e 's,/$,,'`
- fi
- bdb_includes="-I$inc"
- bdb_libs="-L$lib -ldb"
-
- else
- echo "$ac_t""no" 1>&6
- fi
- LDFLAGS="$save_LDFLAGS"
- else
- bdb_dir_ok="$bdb_version_ok"
- fi
- else
- bdb_dir_ok="no db.h file in '$inc'"
- fi
- case $bdb_dir_ok in
- installed ) mode=yes ;;
- * ) { echo "configure: error: didn't find valid BerkeleyDB: $bdb_dir_ok" 1>&2; exit 1; } ;;
- esac
- ;;
- supplied-one )
-
- dir="$bdb"
-
- inc="$dir/include"
- lib="$dir/lib"
- if test -f "$inc/db.h"
- then
-
- db_major=`sed -e '/^.*#define[ ]*DB_VERSION_MAJOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_minor=`sed -e '/^.*#define[ ]*DB_VERSION_MINOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_patch=`sed -e '/^.*#define[ ]*DB_VERSION_PATCH[ ][ ]*/ !d' -e 's///' $inc/db.h`
- test -z "$db_major" && db_major=0
- test -z "$db_minor" && db_minor=0
- 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: " $inc/db.h > /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
- if test X"$bdb_version_ok" = Xyes; then
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L$lib $LDFLAGS"
- echo $ac_n "checking for db_env_create in -ldb""... $ac_c" 1>&6
- echo "configure:9826: checking for db_env_create in -ldb" >&5
- ac_lib_var=`echo db'_'db_env_create | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldb $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 9834 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char db_env_create();
- int main() {
- db_env_create()
- ; return 0; }
- EOF
- if { (eval echo configure:9845: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- bdb_dir_ok=installed
-
- case "$inc" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- inc="$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$inc" != "/"
- then
- inc=`echo $inc | sed -e 's,/$,,'`
- fi
-
- case "$lib" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- lib="$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$lib" != "/"
- then
- lib=`echo $lib | sed -e 's,/$,,'`
- fi
- bdb_includes="-I$inc"
- bdb_libs="-L$lib -ldb"
-
- else
- echo "$ac_t""no" 1>&6
- fi
- LDFLAGS="$save_LDFLAGS"
- else
- bdb_dir_ok="$bdb_version_ok"
- fi
- else
- bdb_dir_ok="no db.h file in '$inc'"
- fi
- if test X"$bdb_dir_ok" != Xinstalled; then
- # test to see if it's a source dir
- rel="$dir/dist/RELEASE"
- if test -f "$rel"; then
-
- db_major=`sed -e '/^DB_VERSION_MAJOR=/ !d' -e 's///' $rel`
- db_minor=`sed -e '/^DB_VERSION_MINOR=/ !d' -e 's///' $rel`
- db_patch=`sed -e '/^DB_VERSION_PATCH=/ !d' -e 's///' $rel`
- test -z "$db_major" && db_major=0
- test -z "$db_minor" && db_minor=0
- 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: " $rel > /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
- if test X"$bdb_version_ok" = Xyes; then
- bdb_dir_ok=source
- bdb="$dir"
-
- case "$dir" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- dir="$(top_builddir)/"`echo "$dir" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$dir" != "/"
- then
- dir=`echo $dir | sed -e 's,/$,,'`
- fi
- bdb_includes="-I$dir/build_unix"
- bdb_libs="-L$dir/build_unix -ldb"
- else
- bdb_dir_ok="$bdb_version_ok"
- fi
- else
- bdb_dir_ok="'$dir' doesn't look like a BDB directory ($bdb_dir_ok)"
- fi
- fi
- case $bdb_dir_ok in
- source ) mode=compile ;;
- installed ) mode=yes ;;
- * ) { echo "configure: error: didn't find valid BerkeleyDB: $bdb_dir_ok" 1>&2; exit 1; } ;;
- esac
- ;;
- search-* )
-
- bdb_dir_ok="no BerkeleyDB found"
- for test_dir in $srcdir/bdb $srcdir/db-*.*.* /usr/local/BerkeleyDB*; do
-
- dir="$test_dir"
-
- inc="$dir/include"
- lib="$dir/lib"
- if test -f "$inc/db.h"
- then
-
- db_major=`sed -e '/^.*#define[ ]*DB_VERSION_MAJOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_minor=`sed -e '/^.*#define[ ]*DB_VERSION_MINOR[ ][ ]*/ !d' -e 's///' $inc/db.h`
- db_patch=`sed -e '/^.*#define[ ]*DB_VERSION_PATCH[ ][ ]*/ !d' -e 's///' $inc/db.h`
- test -z "$db_major" && db_major=0
- test -z "$db_minor" && db_minor=0
- 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: " $inc/db.h > /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
- if test X"$bdb_version_ok" = Xyes; then
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L$lib $LDFLAGS"
- echo $ac_n "checking for db_env_create in -ldb""... $ac_c" 1>&6
- echo "configure:10032: checking for db_env_create in -ldb" >&5
- ac_lib_var=`echo db'_'db_env_create | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldb $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 10040 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char db_env_create();
- int main() {
- db_env_create()
- ; return 0; }
- EOF
- if { (eval echo configure:10051: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- bdb_dir_ok=installed
-
- case "$inc" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- inc="$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$inc" != "/"
- then
- inc=`echo $inc | sed -e 's,/$,,'`
- fi
-
- case "$lib" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- lib="$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$lib" != "/"
- then
- lib=`echo $lib | sed -e 's,/$,,'`
- fi
- bdb_includes="-I$inc"
- bdb_libs="-L$lib -ldb"
-
- else
- echo "$ac_t""no" 1>&6
- fi
- LDFLAGS="$save_LDFLAGS"
- else
- bdb_dir_ok="$bdb_version_ok"
- fi
- else
- bdb_dir_ok="no db.h file in '$inc'"
- fi
- if test X"$bdb_dir_ok" != Xinstalled; then
- # test to see if it's a source dir
- rel="$dir/dist/RELEASE"
- if test -f "$rel"; then
-
- db_major=`sed -e '/^DB_VERSION_MAJOR=/ !d' -e 's///' $rel`
- db_minor=`sed -e '/^DB_VERSION_MINOR=/ !d' -e 's///' $rel`
- db_patch=`sed -e '/^DB_VERSION_PATCH=/ !d' -e 's///' $rel`
- test -z "$db_major" && db_major=0
- test -z "$db_minor" && db_minor=0
- 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: " $rel > /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
- if test X"$bdb_version_ok" = Xyes; then
- bdb_dir_ok=source
- bdb="$dir"
-
- case "$dir" in
- /* ) ;; # don't do anything with an absolute path
- "$srcdir"/* )
- # If BDB is under the source directory, we need to look under the
- # build directory for bdb/build_unix.
- # NOTE: I'm being lazy, and assuming the user did not specify
- # something like --with-berkeley-db=bdb (it would be missing "./").
- dir="$(top_builddir)/"`echo "$dir" | sed -e "s,^$srcdir/,,"`
- ;;
- * )
- { echo "configure: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" 1>&2; exit 1; }
- ;;
- esac
- if test X"$dir" != "/"
- then
- dir=`echo $dir | sed -e 's,/$,,'`
- fi
- bdb_includes="-I$dir/build_unix"
- bdb_libs="-L$dir/build_unix -ldb"
- else
- bdb_dir_ok="$bdb_version_ok"
- fi
- else
- bdb_dir_ok="'$dir' doesn't look like a BDB directory ($bdb_dir_ok)"
- fi
- fi
- if test X"$bdb_dir_ok" = Xsource || test X"$bdb_dir_ok" = Xinstalled; then
- case "$bdb" in
- "$srcdir/"* ) bdb=`echo "$bdb" | sed -e "s,^$srcdir/,,"` ;;
- esac
- break
- fi
- done
- case $bdb_dir_ok in
- source ) mode=compile ;;
- installed ) mode=yes ;;
- * )
- # not found
- case $mode in
- *-yes ) { echo "configure: error: no suitable BerkeleyDB found" 1>&2; exit 1; } ;;
- * ) mode=no ;;
- esac
- bdb_includes=
- bdb_libs=
- ;;
- esac
- ;;
- *)
- { echo "configure: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" 1>&2; exit 1; }
- ;;
- esac
- case $mode in
- no )
- echo "$ac_t""Not using Berkeley DB" 1>&6
- ;;
- yes )
- have_berkeley_db="yes"
- echo "$ac_t""Using Berkeley DB in '$bdb_includes'" 1>&6
- ;;
- compile )
- have_berkeley_db="$bdb"
- echo "$ac_t""Compiling Berekeley DB in '$have_berkeley_db'" 1>&6
- ;;
- * )
- { echo "configure: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" 1>&2; exit 1; }
- ;;
- esac
-
-
- # Check whether --with-innobase or --without-innobase was given.
- if test "${with_innobase+set}" = set; then
- withval="$with_innobase"
- innobase="$withval"
- else
- innobase=no
- fi
- echo $ac_n "checking for Innobase""... $ac_c" 1>&6
- echo "configure:10244: checking for Innobase" >&5
- have_innobase_db=no
- innobase_includes=
- innobase_libs=
- case "$innobase" in
- yes )
- echo "$ac_t""Using Innobase" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_INNOBASE_DB 1
- EOF
- have_innobase_db="yes"
- innobase_includes="-I../innobase/include"
- innobase_libs="
- ../innobase/usr/libusr.a
- ../innobase/odbc/libodbc.a
- ../innobase/srv/libsrv.a
- ../innobase/que/libque.a
- ../innobase/dict/libdict.a
- ../innobase/ibuf/libibuf.a
- ../innobase/row/librow.a
- ../innobase/pars/libpars.a
- ../innobase/btr/libbtr.a
- ../innobase/trx/libtrx.a
- ../innobase/read/libread.a
- ../innobase/usr/libusr.a
- ../innobase/buf/libbuf.a
- ../innobase/ibuf/libibuf.a
- ../innobase/eval/libeval.a
- ../innobase/log/liblog.a
- ../innobase/fsp/libfsp.a
- ../innobase/fut/libfut.a
- ../innobase/fil/libfil.a
- ../innobase/lock/liblock.a
- ../innobase/mtr/libmtr.a
- ../innobase/page/libpage.a
- ../innobase/rem/librem.a
- ../innobase/thr/libthr.a
- ../innobase/com/libcom.a
- ../innobase/sync/libsync.a
- ../innobase/data/libdata.a
- ../innobase/mach/libmach.a
- ../innobase/ha/libha.a
- ../innobase/dyn/libdyn.a
- ../innobase/mem/libmem.a
- ../innobase/sync/libsync.a
- ../innobase/ut/libut.a
- ../innobase/os/libos.a
- ../innobase/ut/libut.a"
- echo $ac_n "checking for aio_read in -lrt""... $ac_c" 1>&6
- echo "configure:10296: checking for aio_read in -lrt" >&5
- ac_lib_var=`echo rt'_'aio_read | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lrt $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 10304 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char aio_read();
- int main() {
- aio_read()
- ; return 0; }
- EOF
- if { (eval echo configure:10315: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- innobase_libs="$innobase_libs -lrt"
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- * )
- echo "$ac_t""Not using Innobase" 1>&6
- ;;
- esac
-
-
- # If we have threads generate some library functions and test programs
- sql_server_dirs=
- server_scripts=
- thread_dirs=
- sql_client_dirs="libmysql client"
- linked_client_targets="linked_libmysql_sources"
- CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS
- if test "$THREAD_SAFE_CLIENT" != "no"
- then
- sql_client_dirs="libmysql_r $sql_client_dirs"
- linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
- cat >> confdefs.h <<EOF
- #define THREAD_SAFE_CLIENT 1
- EOF
- fi
- if test "$with_server" = "yes"
- then
- cat >> confdefs.h <<EOF
- #define THREAD 1
- EOF
- # Avoid _PROGRAMS names
- THREAD_LPROGRAMS="test_thr_alarm test_thr_lock"
-
- THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o"
-
- sql_server_dirs="strings dbug mysys extra regex isam merge myisam myisammrg heap sql"
- server_scripts="safe_mysqld 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
- sql_server_dirs="$have_berkeley_db $sql_server_dirs"
- echo "CONFIGURING FOR BERKELEY DB"
- bdb_conf_flags=
- if test $with_debug = "yes"
- then
- bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
- fi
- # NOTICE: if you're compiling BDB, it needs to be a SUBDIR
- # of $srcdir (i.e., you can 'cd $srcdir/$bdb'). It won't
- # work otherwise.
- if test -d "$bdb"; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the BDB directory: `pwd`:$bdb"
- mkdir "$bdb" || exit 1
- fi
- if test -d "$bdb"/build_unix; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the build_unix directory: `pwd`:$bdb/build_unix"
- mkdir "$bdb/build_unix" || exit 1
- fi
- rel_srcdir=
- case "$srcdir" in
- /* ) rel_srcdir="$srcdir" ;;
- * ) rel_srcdir="../../$srcdir" ;;
- esac
- (cd $bdb/build_unix &&
- sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) ||
- { echo "configure: error: could not configure Berkeley DB" 1>&2; exit 1; }
- echo "END OF BERKELEY DB CONFIGURATION"
- fi
- cat >> confdefs.h <<EOF
- #define HAVE_BERKELEY_DB 1
- EOF
- else
- if test -d bdb; then :
- else
- mkdir bdb && mkdir bdb/build_unix
- fi
- if test -r bdb/build_unix/db.h; then :
- else
- cat <<EOF > bdb/build_unix/db.h
- This file is a placeholder to fool make. The way that automake
- and GNU make work together causes some files to depend on this
- header, even if we're not building with Berkeley DB.
- Obviously, if this file *is* used, it'll break and hopefully we can find
- out why this file was generated by $(top_srcdir)/configure instead of
- the real db.h.
- If you run into some problems because of this file, please use mysql_bug
- to generate a bug report, and give the exact output of make and any
- details you can think of. Send the message to bugs@lists.mysql.com.
- Thank you!
- EOF
- fi
- fi
- if test X"$have_innobase_db" = Xyes
- then
- sql_server_dirs="innobase $sql_server_dirs"
- echo "CONFIGURING FOR INNOBASE DB"
- (cd innobase && sh ./configure)
- || { echo "configure: error: could not configure Innobase DB" 1>&2; exit 1; }
- echo "END OF INNOBASE DB CONFIGURATION"
- fi
- if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
- then
- # MIT user level threads
- thread_dirs="mit-pthreads"
- cat >> confdefs.h <<EOF
- #define HAVE_mit_thread 1
- EOF
- MT_INCLUDES="-I$(top_srcdir)/mit-pthreads/include"
-
- MT_LD_ADD="-L $(top_srcdir)/mit-pthreads/obj/ -lpthread"
-
- LIBS="$MT_LD_ADD $LIBS"
- echo ""
- echo "Configuring MIT Pthreads"
- # We will never install so installation paths are not needed.
- (cd mit-pthreads; sh ./configure)
- echo "End of MIT Pthreads configuration"
- echo ""
- fi
- fi
- #if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
- #then
- # MIT pthreads does now support connecting with unix sockets
- # AC_DEFINE(HAVE_THREADS_WITHOUT_SOCKETS)
- #fi
- # Some usefull subst
- # Output results
- trap '' 1 2 15
- cat > confcache <<EOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- # scripts and configure runs. It is not useful on other systems.
- # If it contains results you don't want to keep, you may remove or edit it.
- #
- # By default, configure uses ./config.cache as the cache file,
- # creating it if it does not exist already. You can give configure
- # the --cache-file=FILE option to use a different cache file; that is
- # what configure does when it calls configure scripts in
- # subdirectories, so they share the cache.
- # Giving --cache-file=/dev/null disables caching, for debugging configure.
- # config.status only pays attention to the cache file if you give it the
- # --recheck option to rerun configure.
- #
- EOF
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space= *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\ into \, and sed turns \ into ).
- sed -n
- -e "s/'/'\\''/g"
- -e "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1='\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*)=(.*)/1=${1=2}/p'
- ;;
- esac >> confcache
- if cmp -s $cache_file confcache; then
- :
- else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- fi
- rm -f confcache
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- # Any assignment to VPATH causes Sun make to only execute
- # the first set of double-colon rules, so remove it if not needed.
- # If there is a colon in the path, we need to keep it.
- if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- fi
- trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- DEFS=-DHAVE_CONFIG_H
- # Without the "./", some shells look in PATH for config.status.
- : ${CONFIG_STATUS=./config.status}
- echo creating $CONFIG_STATUS
- rm -f $CONFIG_STATUS
- cat > $CONFIG_STATUS <<EOF
- #! /bin/sh
- # Generated automatically by configure.
- # Run this file to recreate the current configuration.
- # This directory was configured as follows,
- # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- #
- # $0 $ac_configure_args
- #
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
- case "$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "$ac_cs_usage"; exit 0 ;;
- *) echo "$ac_cs_usage"; exit 1 ;;
- esac
- done
- ac_given_srcdir=$srcdir
- ac_given_INSTALL="$INSTALL"
- trap 'rm -fr `echo "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
- merge/Makefile dbug/Makefile scripts/Makefile
- include/Makefile sql-bench/Makefile
- tests/Makefile Docs/Makefile support-files/Makefile
- mysql-test/Makefile
- include/mysql_version.h
- config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
- $ac_vpsub
- $extrasub
- s%@SHELL@%$SHELL%g
- s%@CFLAGS@%$CFLAGS%g
- s%@CPPFLAGS@%$CPPFLAGS%g
- s%@CXXFLAGS@%$CXXFLAGS%g
- s%@FFLAGS@%$FFLAGS%g
- s%@DEFS@%$DEFS%g
- s%@LDFLAGS@%$LDFLAGS%g
- s%@LIBS@%$LIBS%g
- s%@exec_prefix@%$exec_prefix%g
- s%@prefix@%$prefix%g
- s%@program_transform_name@%$program_transform_name%g
- s%@bindir@%$bindir%g
- s%@sbindir@%$sbindir%g
- s%@libexecdir@%$libexecdir%g
- s%@datadir@%$datadir%g
- s%@sysconfdir@%$sysconfdir%g
- s%@sharedstatedir@%$sharedstatedir%g
- s%@localstatedir@%$localstatedir%g
- s%@libdir@%$libdir%g
- s%@includedir@%$includedir%g
- s%@oldincludedir@%$oldincludedir%g
- s%@infodir@%$infodir%g
- s%@mandir@%$mandir%g
- s%@host@%$host%g
- s%@host_alias@%$host_alias%g
- s%@host_cpu@%$host_cpu%g
- s%@host_vendor@%$host_vendor%g
- s%@host_os@%$host_os%g
- s%@target@%$target%g
- s%@target_alias@%$target_alias%g
- s%@target_cpu@%$target_cpu%g
- s%@target_vendor@%$target_vendor%g
- s%@target_os@%$target_os%g
- s%@build@%$build%g
- s%@build_alias@%$build_alias%g
- s%@build_cpu@%$build_cpu%g
- s%@build_vendor@%$build_vendor%g
- s%@build_os@%$build_os%g
- s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
- s%@INSTALL_DATA@%$INSTALL_DATA%g
- s%@PACKAGE@%$PACKAGE%g
- s%@VERSION@%$VERSION%g
- s%@ACLOCAL@%$ACLOCAL%g
- s%@AUTOCONF@%$AUTOCONF%g
- s%@AUTOMAKE@%$AUTOMAKE%g
- s%@AUTOHEADER@%$AUTOHEADER%g
- s%@MAKEINFO@%$MAKEINFO%g
- s%@SET_MAKE@%$SET_MAKE%g
- s%@MYSQL_NO_DASH_VERSION@%$MYSQL_NO_DASH_VERSION%g
- s%@MYSQL_BASE_VERSION@%$MYSQL_BASE_VERSION%g
- s%@MYSQL_VERSION_ID@%$MYSQL_VERSION_ID%g
- s%@PROTOCOL_VERSION@%$PROTOCOL_VERSION%g
- s%@DOT_FRM_VERSION@%$DOT_FRM_VERSION%g
- s%@SHARED_LIB_VERSION@%$SHARED_LIB_VERSION%g
- s%@AVAILABLE_LANGUAGES@%$AVAILABLE_LANGUAGES%g
- s%@AVAILABLE_LANGUAGES_ERRORS@%$AVAILABLE_LANGUAGES_ERRORS%g
- /@AVAILABLE_LANGUAGES_ERRORS_RULES@/r $AVAILABLE_LANGUAGES_ERRORS_RULES
- s%@AVAILABLE_LANGUAGES_ERRORS_RULES@%%g
- s%@SYSTEM_TYPE@%$SYSTEM_TYPE%g
- s%@MACHINE_TYPE@%$MACHINE_TYPE%g
- s%@CONF_COMMAND@%$CONF_COMMAND%g
- s%@SAVE_CFLAGS@%$SAVE_CFLAGS%g
- s%@SAVE_CXXFLAGS@%$SAVE_CXXFLAGS%g
- s%@SAVE_LDFLAGS@%$SAVE_LDFLAGS%g
- s%@SAVE_CXXLDFLAGS@%$SAVE_CXXLDFLAGS%g
- s%@CXXLDFLAGS@%$CXXLDFLAGS%g
- s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
- s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
- s%@MAINT@%$MAINT%g
- s%@LOCAL_TRUE@%$LOCAL_TRUE%g
- s%@LOCAL_FALSE@%$LOCAL_FALSE%g
- s%@AWK@%$AWK%g
- s%@CC@%$CC%g
- s%@CXX@%$CXX%g
- s%@CPP@%$CPP%g
- s%@AS@%$AS%g
- s%@RANLIB@%$RANLIB%g
- s%@LN_S@%$LN_S%g
- s%@LIBTOOL@%$LIBTOOL%g
- s%@YACC@%$YACC%g
- s%@PDFMANUAL@%$PDFMANUAL%g
- s%@uname_prog@%$uname_prog%g
- s%@LD@%$LD%g
- s%@MYSQLD_DEFAULT_SWITCHES@%$MYSQLD_DEFAULT_SWITCHES%g
- s%@IS_LINUX@%$IS_LINUX%g
- s%@LN@%$LN%g
- s%@LN_CP_F@%$LN_CP_F%g
- s%@MV@%$MV%g
- s%@RM@%$RM%g
- s%@CP@%$CP%g
- s%@SED@%$SED%g
- s%@CMP@%$CMP%g
- s%@CHMOD@%$CHMOD%g
- s%@HOSTNAME@%$HOSTNAME%g
- s%@PERL@%$PERL%g
- s%@PERL5@%$PERL5%g
- s%@PS@%$PS%g
- s%@FIND_PROC@%$FIND_PROC%g
- s%@KILL@%$KILL%g
- s%@CHECK_PID@%$CHECK_PID%g
- s%@MYSQL_SERVER_SUFFIX@%$MYSQL_SERVER_SUFFIX%g
- s%@ASSEMBLER_x86_TRUE@%$ASSEMBLER_x86_TRUE%g
- s%@ASSEMBLER_x86_FALSE@%$ASSEMBLER_x86_FALSE%g
- s%@ASSEMBLER_sparc_TRUE@%$ASSEMBLER_sparc_TRUE%g
- s%@ASSEMBLER_sparc_FALSE@%$ASSEMBLER_sparc_FALSE%g
- s%@ASSEMBLER_TRUE@%$ASSEMBLER_TRUE%g
- s%@ASSEMBLER_FALSE@%$ASSEMBLER_FALSE%g
- s%@MYSQL_UNIX_ADDR@%$MYSQL_UNIX_ADDR%g
- s%@MYSQL_TCP_PORT@%$MYSQL_TCP_PORT%g
- s%@MYSQL_TCP_PORT_DEFAULT@%$MYSQL_TCP_PORT_DEFAULT%g
- s%@MYSQLD_USER@%$MYSQLD_USER%g
- s%@GETCONF@%$GETCONF%g
- s%@WRAPLIBS@%$WRAPLIBS%g
- s%@MYSQLD_EXTRA_LDFLAGS@%$MYSQLD_EXTRA_LDFLAGS%g
- s%@CLIENT_EXTRA_LDFLAGS@%$CLIENT_EXTRA_LDFLAGS%g
- s%@LM_CFLAGS@%$LM_CFLAGS%g
- s%@COMPILATION_COMMENT@%$COMPILATION_COMMENT%g
- s%@ALLOCA@%$ALLOCA%g
- s%@MAKE_SHELL@%$MAKE_SHELL%g
- s%@TERMCAP_LIB@%$TERMCAP_LIB%g
- s%@docs_dirs@%$docs_dirs%g
- s%@bench_dirs@%$bench_dirs%g
- s%@readline_dir@%$readline_dir%g
- s%@readline_link@%$readline_link%g
- s%@default_charset@%$default_charset%g
- s%@CHARSET_SRCS@%$CHARSET_SRCS%g
- s%@CHARSET_OBJS@%$CHARSET_OBJS%g
- s%@CHARSETS_NEED_SOURCE@%$CHARSETS_NEED_SOURCE%g
- s%@bdb_includes@%$bdb_includes%g
- s%@bdb_libs@%$bdb_libs%g
- s%@innobase_includes@%$innobase_includes%g
- s%@innobase_libs@%$innobase_libs%g
- s%@CLIENT_LIBS@%$CLIENT_LIBS%g
- s%@sql_client_dirs@%$sql_client_dirs%g
- s%@linked_client_targets@%$linked_client_targets%g
- s%@THREAD_LPROGRAMS@%$THREAD_LPROGRAMS%g
- s%@THREAD_LOBJECTS@%$THREAD_LOBJECTS%g
- s%@MT_INCLUDES@%$MT_INCLUDES%g
- s%@MT_LD_ADD@%$MT_LD_ADD%g
- s%@sql_server_dirs@%$sql_server_dirs%g
- s%@thread_dirs@%$thread_dirs%g
- s%@server_scripts@%$server_scripts%g
- s%@GXX@%$GXX%g
- CEOF
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
- ac_file=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_cmds # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=""
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_FILES=${CONFIG_FILES-"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
- merge/Makefile dbug/Makefile scripts/Makefile
- include/Makefile sql-bench/Makefile
- tests/Makefile Docs/Makefile support-files/Makefile
- mysql-test/Makefile
- include/mysql_version.h
- "}
- EOF
- cat >> $CONFIG_STATUS <<EOF
- for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\
- # $configure_input" ;;
- *) ac_comsub= ;;
- esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
- s%@configure_input@%$configure_input%g
- s%@srcdir@%$srcdir%g
- s%@top_srcdir@%$top_srcdir%g
- s%@INSTALL@%$INSTALL%g
- " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
- fi; done
- rm -f conftest.s*
- # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
- # NAME is the cpp macro being defined and VALUE is the value it is being given.
- #
- # ac_d sets the value in "#define NAME VALUE" lines.
- ac_dA='s%^([ ]*)#([ ]*define[ ][ ]*)'
- ac_dB='([ ][ ]*)[^ ]*%1#2'
- ac_dC='3'
- ac_dD='%g'
- # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- ac_uA='s%^([ ]*)#([ ]*)undef([ ][ ]*)'
- ac_uB='([ ])%1#2define3'
- ac_uC=' '
- ac_uD='4%g'
- # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- ac_eA='s%^([ ]*)#([ ]*)undef([ ][ ]*)'
- ac_eB='$%1#2define3'
- ac_eC=' '
- ac_eD='%g'
- if test "${CONFIG_HEADERS+set}" != set; then
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
- EOF
- cat >> $CONFIG_STATUS <<EOF
- fi
- for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- echo creating $ac_file
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
- EOF
- # Transform confdefs.h into a sed script conftest.vals that substitutes
- # the proper values into config.h.in to produce config.h. And first:
- # Protect against being on the right side of a sed subst in config.status.
- # Protect against being in an unquoted here document in config.status.
- rm -f conftest.vals
- cat > conftest.hdr <<EOF
- s/[\&%]/\&/g
- s%[\$`]%\&%g
- s%#define ([A-Za-z_][A-Za-z0-9_]*) *(.*)%${ac_dA}1${ac_dB}1${ac_dC}2${ac_dD}%gp
- s%ac_d%ac_u%gp
- s%ac_u%ac_e%gp
- EOF
- sed -n -f conftest.hdr confdefs.h > conftest.vals
- rm -f conftest.hdr
- # This sed command replaces #undef with comments. This is necessary, for
- # example, in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- cat >> conftest.vals <<EOF
- s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
- EOF
- # Break up conftest.vals because some shells have a limit on
- # the size of here documents, and old seds have small limits too.
- rm -f conftest.tail
- while :
- do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
- ' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
- done
- rm -f conftest.vals
- cat >> $CONFIG_STATUS <<EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
- fi; done
- EOF
- cat >> $CONFIG_STATUS <<EOF
- test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
- rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
-
- EOF
- cat >> $CONFIG_STATUS <<EOF
- test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
- exit 0
- EOF
- chmod +x $CONFIG_STATUS
- rm -fr confdefs* $ac_clean_files
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
- echo
- echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
- echo "latest release, upcoming features, and other information to make your"
- echo "work or play with MySQL more productive. There you can also find"
- echo "information about mailing lists for MySQL discussion."
- echo
- echo "Remember to check the platform specific part in the reference manual for"
- echo "hints about installing on your platfrom. See the Docs directory."
- echo
- # This text is checked in ./Do-compile to se that the configure finished.
- echo "Thank you for choosing MySQL!"
- echo