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.

72 lines
2.1 KiB

15 years ago
15 years ago
  1. #!/usr/bin/bash
  2. # Copyright (C) 2007 MySQL AB
  3. #
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU Library General Public
  6. # License as published by the Free Software Foundation; version 2
  7. # of the License.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. # Library General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU Library General Public
  15. # License along with this library; if not, write to the Free
  16. # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  17. # MA 02110-1301, USA
  18. function _find_mysql_root () (
  19. while [ "x$PWD" != "x/" ]; do
  20. # Check if some directories are present
  21. if [ -d BUILD -a -d sql -a -d mysys ]; then
  22. echo "$PWD"
  23. return 0
  24. fi
  25. cd ..
  26. done
  27. return 1
  28. )
  29. make -k clean || true
  30. /bin/rm -f */.deps/*.P config.cache
  31. path=`dirname $0`
  32. . "$path/autorun.sh"
  33. warning_flags="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused"
  34. compiler_flags="-g -O3 -fno-omit-frame-pointer"
  35. export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS
  36. CC="gcc"
  37. CXX="gcc"
  38. CFLAGS="$warning_flags $compiler_flags"
  39. CXXFLAGS=""
  40. LDFLAGS="-O3 -g -static-libgcc"
  41. LIBS=-lmtmalloc
  42. root=$(_find_mysql_root)
  43. $root/configure \
  44. --prefix=/usr/local/mysql \
  45. --localstatedir=/usr/local/mysql/data \
  46. --libexecdir=/usr/local/mysql/bin \
  47. --with-extra-charsets=complex \
  48. --enable-thread-safe-client \
  49. --enable-local-infile \
  50. --with-zlib-dir=bundled \
  51. --with-big-tables \
  52. --with-readline \
  53. --with-archive-storage-engine \
  54. --with-named-curses=-lcurses \
  55. --with-big-tables \
  56. --with-innodb \
  57. --with-berkeley-db \
  58. --with-example-storage-engine \
  59. --with-blackhole-storage-engine \
  60. --with-ndbcluster \
  61. --with-federated-storage-engine \
  62. --with-csv-storage-engine \
  63. --with-ssl \
  64. --with-embedded-server \
  65. --disable-shared