You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. #!/usr/bin/bash
  2. function _find_mysql_root () (
  3. while [ "x$PWD" != "x/" ]; do
  4. # Check if some directories are present
  5. if [ -d BUILD -a -d sql -a -d mysys ]; then
  6. echo "$PWD"
  7. return 0
  8. fi
  9. cd ..
  10. done
  11. return 1
  12. )
  13. make -k clean || true
  14. /bin/rm -f */.deps/*.P config.cache
  15. path=`dirname $0`
  16. . "$path/autorun.sh"
  17. warning_flags="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused"
  18. compiler_flags="-g -O3 -fno-omit-frame-pointer"
  19. export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS
  20. CC="gcc"
  21. CXX="gcc"
  22. CFLAGS="$warning_flags $compiler_flags"
  23. CXXFLAGS=""
  24. LDFLAGS="-O3 -g -static-libgcc"
  25. LIBS=-lmtmalloc
  26. root=$(_find_mysql_root)
  27. $root/configure \
  28. --prefix=/usr/local/mysql \
  29. --localstatedir=/usr/local/mysql/data \
  30. --libexecdir=/usr/local/mysql/bin \
  31. --with-extra-charsets=complex \
  32. --enable-thread-safe-client \
  33. --enable-local-infile \
  34. --with-zlib-dir=bundled \
  35. --with-big-tables \
  36. --with-readline \
  37. --with-archive-storage-engine \
  38. --with-named-curses=-lcurses \
  39. --with-big-tables \
  40. --with-innodb \
  41. --with-berkeley-db \
  42. --with-example-storage-engine \
  43. --with-blackhole-storage-engine \
  44. --with-ndbcluster \
  45. --with-federated-storage-engine \
  46. --with-csv-storage-engine \
  47. --with-ssl \
  48. --with-embedded-server \
  49. --disable-shared