| 1 | #! /bin/sh |
| 2 | # Copyright (c) 2001, 2002, 2005, 2007 MySQL AB, 2008 Sun Microsystems, Inc. |
| 3 | # Use is subject to license terms. |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; version 2 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 |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program; if not, write to the Free Software |
| 16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA |
| 17 | |
| 18 | # Copyright (c) 2001, 2002, 2005, 2007 MySQL AB, 2008 Sun Microsystems, Inc. |
| 19 | # Use is subject to license terms. |
| 20 | # |
| 21 | # This program is free software; you can redistribute it and/or modify |
| 22 | # it under the terms of the GNU General Public License as published by |
| 23 | # the Free Software Foundation; version 2 of the License. |
| 24 | # |
| 25 | # This program is distributed in the hope that it will be useful, |
| 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 | # GNU General Public License for more details. |
| 29 | # |
| 30 | # You should have received a copy of the GNU General Public License |
| 31 | # along with this program; if not, write to the Free Software |
| 32 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA |
| 33 | |
| 34 | # Assume Forte is installed in /opt/SUNWSpro and ld is installed in |
| 35 | # /usr/ccs/bin |
| 36 | |
| 37 | PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:$PATH |
| 38 | |
| 39 | prefix="/usr/local/mysql" |
| 40 | if test -n "$MYSQL_BUILD_PREFIX" |
| 41 | then |
| 42 | prefix="$MYSQL_BUILD_PREFIX" |
| 43 | fi |
| 44 | |
| 45 | make -k maintainer-clean || true |
| 46 | /bin/rm -f */.deps/*.P config.cache |
| 47 | |
| 48 | path=`dirname $0` |
| 49 | . "$path/autorun.sh" |
| 50 | |
| 51 | # For "optimal" code for this computer add -fast to EXTRA |
| 52 | # To compile 32/64 bit, uncomment/comment EXTRA_64_BIT |
| 53 | |
| 54 | EXTRA_64_BIT="-m64" |
| 55 | EXTRA="-fast" # Remove comment to target current machine |
| 56 | |
| 57 | # |
| 58 | # The following should not need to be touched |
| 59 | # |
| 60 | |
| 61 | STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT" |
| 62 | CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \ |
| 63 | CXX=CC CXXFLAGS="-noex $STD" LIBS="-lmtmalloc" \ |
| 64 | ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --prefix=$PREFIX |
| 65 | |
| 66 | make -j 4 |
| 67 | if [ $? = 0 ] |
| 68 | then |
| 69 | make test |
| 70 | fi |