List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:October 21 2008 7:00pm
Subject:bzr push into mysql-5.0 branch (df:2659 to 2663)
View as plain text  
 2663 Daniel Fischer	2008-10-21
      fix
modified:
  BUILD/preconfigure

 2662 Daniel Fischer	2008-10-21
      hpux 11.00 no longer supported
modified:
  BUILD/preconfigure

 2661 Daniel Fischer	2008-10-21
      sort platforms in no particular order
modified:
  BUILD/preconfigure

 2660 Daniel Fischer	2008-10-21
      remove hardcoded paths
modified:
  BUILD/preconfigure

 2659 Daniel Fischer	2008-10-20
      fix libedit/readline in preconfigure
modified:
  BUILD/preconfigure

=== modified file 'BUILD/preconfigure'
--- a/BUILD/preconfigure	2008-10-20 13:00:30 +0000
+++ b/BUILD/preconfigure	2008-10-21 18:10:05 +0000
@@ -44,6 +44,62 @@
 #            aggregate($cfg, $default); print_config($cfg)'
 #
 
+#
+# The following is only of interest for developers.
+#
+# Configuration hash format:
+# -------------------------
+#
+# Configuration is maintained in a hash with three keys:
+# - "env" contains environment variables
+# - "opt" contains configure options
+# - "win" contains options for the Windows configure.js script
+#
+# All of these are hashes, with keys being the name of the variable or
+# option, and the value being the value that should be set. If no value
+# should be set, "undef" can be specified.
+#
+# Configuration hash generation:
+# -----------------------------
+#
+# The configuration hash for the requested build is generated by executing
+# the following steps:
+#
+# - an empty configuration is assumed
+# - $default is merged in
+# - $products->{requested product name} is merged in
+# - $platforms->{requested platform name} is merged in
+# - $debug is merged in if a debug build was requested
+# - options specified on the command line after -- are merged in
+# - CC and CXX are prefixed with "ccache" if requested
+#
+# Merge rules:
+# -----------
+#
+# For environment variables:
+# - the value is split at blanks, all ^ in the parts are replaced with blanks
+# - if the variable name is prefixed with a +, the value of that variable in
+#   the current configuration is replaced with the set union of it and the
+#   blank-delimited parts specified in the new value
+# - if the variable name is prefixed with a -, the value of that variable in
+#   the current configuratino is replaced with the set difference between the
+#   old value and the new value, thereby removing all the blank-delimited 
+#   parts of the new value from the current configuration
+# - in all other cases, the new value replaces the existing value
+#
+# For configure options (UNIX and Windows styles):
+# - if the variable name is prefixed with a !, thddat variable is removed from
+#   the current configuration; the value is ignored
+# - in all other cases, the value replaces the existing value of the configure
+#   option in the current configuration if the option is already present, or
+#   the option is added with the value as specified if it is not present 
+# - for UNIX configure options, any option being added that starts with the
+#   string "--with-" triggers the removal of any existing option of the same
+#   name that starts with "--without-"; and any option being added that starts 
+#   with the string "--without-" likewise triggers the removal of any existing 
+#   option of the same name that starts with "--with-".
+#
+
 use strict;
 
 ##############################################################################
@@ -124,10 +180,10 @@ our $products = {
             '--without-ndbcluster' => undef,
             '--without-innodb' => undef,
             '--with-libedit' => undef,
-            '---with-readline' => undef,
+            '!--with-readline' => undef,
         },
         'win' => {
-            '-WITH_INNOBASE_STORAGE_ENGINE' => undef,
+            '!WITH_INNOBASE_STORAGE_ENGINE' => undef,
         }
     },
     # enterprise
@@ -135,7 +191,7 @@ our $products = {
         'opt' => {
             '--without-ndbcluster' => undef,
             '--with-libedit' => undef,
-            '---with-readline' => undef,
+            '!--with-readline' => undef,
         },
         'win' => {
         },
@@ -154,7 +210,7 @@ our $products = {
             '--without-innodb' => undef,
             '--with-extra-charsets' => 'all',
             '--with-libedit' => undef,
-            '---with-readline' => undef,
+            '!--with-readline' => undef,
         },
         'win' => {
         },
@@ -166,6 +222,42 @@ our $products = {
 ##############################################################################
 our $platforms = {
 ##############################################################################
+# solaris10-sparc-32bit
+#
+    'solaris10-sparc-32bit' => {
+        'env' => {
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8 -xc99=none',
+            'CC' => 'cc-5.0',
+            'LDFLAGS' => '-xarch=v8',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
+            'CXX' => 'CC',
+            'ASFLAGS' => '-xarch=v8',
+        },
+        'opt' => {
+            '--with-mysqld-libs' => '-lmtmalloc',
+            '--with-named-z-libs' => 'no',
+        },
+    },
+
+##############################################################################
+# solaris10-sparc-64bit
+#
+    'solaris10-sparc-64bit' => {
+        'env' => {
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -xc99=none',
+            'CC' => 'cc-5.0',
+            'LDFLAGS' => '-xarch=v9',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
+            'CXX' => 'CC',
+            'ASFLAGS' => '-xarch=v9',
+        },
+        'opt' => {
+            '--with-mysqld-libs' => '-lmtmalloc',
+            '--with-named-z-libs' => 'no',
+        },
+    },
+
+##############################################################################
 # solaris10-x86_64
 #
     'solaris10-x86_64' => {
@@ -185,224 +277,231 @@ our $platforms = {
     },
 
 ##############################################################################
-# qnx6.2.1-x86
+# solaris10-x86
 #
-    'qnx6.2.1-x86' => {
+    'solaris10-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O1 -D_FILE_OFFSET_BITS=64 -Wl,-E',
-            'CC' => 'qcc',
-            'CONFIG_SHELL' => '/usr/bin/bash',
-            'CXXFLAGS' => '-g -O1 -D_FILE_OFFSET_BITS=64 -Wl,-E',
-            'CXX' => 'qcc',
+            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
+            'CC' => 'cc',
+            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
+            'CXX' => 'CC',
         },
         'opt' => {
-            '--without-csv-storage-engine' => undef,
+            '--with-mysqld-libs' => '-lmtmalloc',
+            '--with-named-curses' => '-lcurses',
         },
     },
 
 ##############################################################################
-# aix5.3-powerpc-64bit
+# solaris10-sparc-64bit-gcc
 #
-    'aix5.3-powerpc-64bit' => {
+    'solaris10-sparc-64bit-gcc' => {
         'env' => {
-            'CFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'CC' => 'xlc_r',
-            'LDFLAGS' => '-Wl,-brtl',
-            'CXXFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'CXX' => 'xlC_r',
-            'AR' => 'ar -Xany',
+            'CFLAGS' => '-g -O3 -m64',
+            'CC' => 'gcc -static-libgcc',
+            'AS' => '/opt/gnu/bin/as',
+            'LD' => '/opt/gnu/bin/ld',
+            'CXXFLAGS' => '-g -O3 -felide-constructors -fno-exceptions -fno-rtti -m64',
+            'CXX' => 'gcc -static-libgcc',
+            'CXXLD' => 'g++ -static-libgcc',
         },
         'opt' => {
             '--with-named-z-libs' => 'no',
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris10-sparc-64bit
+# solaris9-sparc-32bit
 #
-    'solaris10-sparc-64bit' => {
+    'solaris9-sparc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -xc99=none',
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8',
             'CC' => 'cc-5.0',
-            'LDFLAGS' => '-xarch=v9',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
+            'LDFLAGS' => '-xarch=v8',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
             'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v9',
+            'ASFLAGS' => '-xarch=v8',
         },
         'opt' => {
-            '--with-mysqld-libs' => '-lmtmalloc',
-            '--with-named-z-libs' => 'no',
+            '--enable-assembler' => undef,
+            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# linux-x86-icc
+# solaris9-sparc-64bit
 #
-    'linux-x86-icc' => {
+    'solaris9-sparc-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -mp -restrict',
-            'CC' => 'icc  -static-intel -static-libgcc',
-            'CXXFLAGS' => '-g -O3 -mp -restrict',
-            'CXX' => 'icpc -static-intel -static-libgcc',
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9',
+            'CC' => 'cc-5.0',
+            'LDFLAGS' => '-xarch=v9',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
+            'CXX' => 'CC',
+            'ASFLAGS' => '-xarch=v9',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
-            '--enable-assembler' => undef,
-            '---with-yassl' => undef,
+            '--with-named-z-libs' => 'no',
         },
     },
 
 ##############################################################################
-# linux-s390x
+# solaris9-x86
 #
-    'linux-s390x' => {
+    'solaris9-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O2',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O2 -felide-constructors',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
+            'CC' => 'cc',
+            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
+            'CXX' => 'CC',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
+            '--with-named-curses' => '-lcurses',
         },
     },
 
 ##############################################################################
-# osx10.5-x86
+# solaris8-sparc-32bit
 #
-    'osx10.5-x86' => {
+    'solaris8-sparc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch i386 -fno-common',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -Os -arch i386 -felide-constructors -fno-common',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8',
+            'CC' => 'cc-5.0',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
+            'CXX' => 'CC',
+            'ASFLAGS' => '-xarch=v8',
         },
         'opt' => {
+            '--with-named-z-libs' => 'no',
+            '--enable-assembler' => undef,
+            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# osx10.3-powerpc-32bit
+# solaris8-sparc-64bit
 #
-    'osx10.3-powerpc-32bit' => {
+    'solaris8-sparc-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -fno-common',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3 -fno-common',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9',
+            'CC' => 'cc-5.0',
+            'LDFLAGS' => '-xarch=v9',
+            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
+            'CXX' => 'CC',
+            'ASFLAGS' => '-xarch=v9',
         },
         'opt' => {
+            '--with-named-z-libs' => 'no',
+            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# i5os-power-64bit
+# solaris8-x86
 #
-    'i5os-power-64bit' => {
+    'solaris8-x86' => {
         'env' => {
-            'CFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'NM' => 'nm -X64',
-            'CC' => 'xlc_r',
-            'LDFLAGS' => '-Wl,-brtl',
-            'CXXFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'CXX' => 'xlC_r',
-            'AR' => 'ar -X64',
+            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
+            'CC' => 'cc',
+            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
+            'CXX' => 'CC',
         },
         'opt' => {
-            '--with-machine-type' => 'power',
-            '--with-named-z-libs' => 'no',
-            '--build' => 'powerpc-ibm-aix5.3.0.0',
-            '--with-system-type' => 'ibm-i5os',
-            '--host' => 'powerpc-ibm-aix5.3.0.0',
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-x86-static
+# solaris8-sparc-32bit-gcc
 #
-    'linux-x86-static' => {
+    'solaris8-sparc-32bit-gcc' => {
         'env' => {
-            'CFLAGS' => '-g -O2 -mcpu=pentiumpro',
+            'CFLAGS' => '-g -xO3 -DHAVE_MYSYS_NEW',
             'CC' => 'gcc',
-            'CPPFLAGS' => '-I/usr/local/include -DDEFAULT_THREAD_STACK=126976',
-            'LDFLAGS' => '-L/usr/local/lib',
-            'CXXFLAGS' => '-g -O2 -mcpu=pentiumpro -felide-constructors',
+            'CXXFLAGS' => '-g -xO3 -DHAVE_MYSYS_NEW',
             'CXX' => 'gcc',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
+            '--with-named-z-libs' => 'no',
             '--enable-assembler' => undef,
-            '--with-client-ldflags' => '-all-static',
-            '--with-mysqld-ldflags' => '-all-static',
-            '---with-zlib-dir' => undef,
+            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# osx10.4-powerpc-64bit
+# solaris8-sparc-64bit-gcc
 #
-    'osx10.4-powerpc-64bit' => {
+    'solaris8-sparc-64bit-gcc' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch ppc64 -fno-common',
+            'CFLAGS' => '-g -O -m64',
             'CC' => 'gcc -static-libgcc',
-            'LDFLAGS' => '-arch ppc64',
-            'CXXFLAGS' => '-g -Os -arch ppc64 -felide-constructors -fno-common',
+            'LDFLAGS' => '-m64',
+            'CXXFLAGS' => '-g -O3 -DHAVE_MYSYS_NEW -m64',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-named-curses-libs' => '/Users/mysqldev/local/lib/libncurses.a',
+            '--with-named-z-libs' => 'no',
+            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# aix5.3-powerpc-32bit
+# i5os-power-64bit
 #
-    'aix5.3-powerpc-32bit' => {
+    'i5os-power-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
+            'NM' => 'nm -X64',
             'CC' => 'xlc_r',
             'LDFLAGS' => '-Wl,-brtl',
-            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CXXFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
             'CXX' => 'xlC_r',
+            'AR' => 'ar -X64',
         },
         'opt' => {
+            '--with-machine-type' => 'power',
             '--with-named-z-libs' => 'no',
-            '---with-yassl' => undef,
+            '--build' => 'powerpc-ibm-aix5.3.0.0',
+            '--with-system-type' => 'ibm-i5os',
+            '--host' => 'powerpc-ibm-aix5.3.0.0',
+            '!--with-yassl' => undef,
         },
     },
 
-
 ##############################################################################
-# osx10.4-x86
+# i5os-power-32bit
 #
-    'osx10.4-x86' => {
+    'i5os-power-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch i386 -fno-common',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -Os -arch i386 -felide-constructors -fno-common',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CC' => 'xlc_r',
+            'LDFLAGS' => '-Wl,-brtl',
+            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CXX' => 'xlC_r',
         },
         'opt' => {
+            '--with-machine-type' => 'power',
+            '--with-named-z-libs' => 'no',
+            '--build' => 'powerpc-ibm-aix5.3.0.0',
+            '--with-system-type' => 'ibm-i5os',
+            '--host' => 'powerpc-ibm-aix5.3.0.0',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris8-sparc-64bit
+# aix5.2-powerpc-32bit
 #
-    'solaris8-sparc-64bit' => {
+    'aix5.2-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9',
-            'CC' => 'cc-5.0',
-            'LDFLAGS' => '-xarch=v9',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
-            'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v9',
+            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CC' => 'xlc_r',
+            'LDFLAGS' => '-Wl,-brtl',
+            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CXX' => 'xlC_r',
         },
         'opt' => {
             '--with-named-z-libs' => 'no',
-            '--with-named-curses-libs' => '-lcurses',
+            '!--with-yassl' => undef,
         },
     },
 
@@ -420,94 +519,100 @@ our $platforms = {
         },
         'opt' => {
             '--with-named-z-libs' => 'no',
-            '---with-yassl' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# freebsd6.0-x86
+# aix5.3-powerpc-32bit
 #
-    'freebsd6.0-x86' => {
+    'aix5.3-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -O3',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CC' => 'xlc_r',
+            'LDFLAGS' => '-Wl,-brtl',
+            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
+            'CXX' => 'xlC_r',
         },
         'opt' => {
-            '--enable-assembler' => undef,
+            '--with-named-z-libs' => 'no',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris8-x86
+# aix5.3-powerpc-64bit
 #
-    'solaris8-x86' => {
+    'aix5.3-powerpc-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
-            'CC' => 'cc',
-            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
-            'CXX' => 'CC',
+            'CFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
+            'CC' => 'xlc_r',
+            'LDFLAGS' => '-Wl,-brtl',
+            'CXXFLAGS' => '-g -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
+            'CXX' => 'xlC_r',
+            'AR' => 'ar -Xany',
         },
         'opt' => {
+            '--with-named-z-libs' => 'no',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-x86_64
+# aix4.3-powerpc-32bit
 #
-    'linux-x86_64' => {
+    'aix4.3-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -O3',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
+            'CC' => 'xlc_r',
+            'CXXFLAGS' => '-g -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
+            'CXX' => 'xlC_r',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
+            '--with-named-z-libs' => 'no',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris10-sparc-64bit-gcc
+# freebsd6.0-x86
 #
-    'solaris10-sparc-64bit-gcc' => {
+    'freebsd6.0-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -m64',
+            'CFLAGS' => '-g -O3',
             'CC' => 'gcc -static-libgcc',
-            'AS' => '/opt/gnu/bin/as',
-            'LD' => '/opt/gnu/bin/ld',
-            'CXXFLAGS' => '-g -O3 -felide-constructors -fno-exceptions -fno-rtti -m64',
+            'CXXFLAGS' => '-g -O3',
             'CXX' => 'gcc -static-libgcc',
-            'CXXLD' => 'g++ -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
+            '--enable-assembler' => undef,
         },
     },
 
 ##############################################################################
-# openserver6-x86
+# freebsd6.0-x86_64
 #
-    'openserver6-x86' => {
+    'freebsd6.0-x86_64' => {
         'env' => {
-            'CFLAGS' => '-D_FILE_OFFSET_BITS=64 optO -DDBUG_OFF -Kalloca',
-            'CC' => 'cc',
-            'CXXFLAGS' => '-D_FILE_OFFSET_BITS=64 optO3 -DDBUG_OFF -Kalloca -Kalloca -Tno_implicit',
-            'CXX' => 'CC',
+            'CFLAGS' => '-g -O3',
+            'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -O3',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--build' => 'i686-unknown-sysv5SCO_SV6.0.0',
-            '---with-yassl' => undef,
+            '--with-machine-type' => 'x86_64',
+            '--enable-assembler' => undef,
         },
     },
 
 ##############################################################################
-# linux-ia64
+# linux-x86_64
 #
-    'linux-ia64' => {
+    'linux-x86_64' => {
         'env' => {
+            'CFLAGS' => '-g -O3',
             'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -O3',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
@@ -516,58 +621,26 @@ our $platforms = {
     },
 
 ##############################################################################
-# osx10.4-powerpc-32bit
+# linux-sles9-x86_64
 #
-    'osx10.4-powerpc-32bit' => {
+    'linux-sles9-x86_64' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch ppc -fno-common',
             'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -Os -arch ppc -felide-constructors -fno-common',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
+            '--with-fast-mutexes' => undef,
         },
     },
 
 ##############################################################################
-# hpux11.00-hppa-32bit
-#
-    'hpux11.00-hppa-32bit' => {
-        'env' => {
-            'CFLAGS' => '-g +O2 +DAportable',
-            'CC' => 'cc',
-            'CPPFLAGS' => '-DDEFAULT_THREAD_STACK=262144',
-            'CXXFLAGS' => '-g +O2 +DAportable -Aa',
-            'CXX' => 'aCC',
-        },
-        'opt' => {
-            '---with-yassl' => undef,
-        },
-    },
-
-##############################################################################
-# hpux11.31-hppa-32bit
-#
-    'hpux11.31-hppa-32bit' => {
-        'env' => {
-            'CFLAGS' => '-g +O1 +DAportable',
-            'CC' => 'cc',
-            'CPPFLAGS' => '-DDEFAULT_THREAD_STACK=262144',
-            'CXXFLAGS' => '-g +O1 +DAportable -Aa',
-            'CXX' => 'aCC',
-            'INSTALL' => '/usr/local/bin/install',
-        },
-        'opt' => {
-            '---with-yassl' => undef,
-        },
-    },
-
-##############################################################################
-# linux-sles9-x86_64
+# linux-powerpc
 #
-    'linux-sles9-x86_64' => {
+    'linux-powerpc' => {
         'env' => {
+            'CFLAGS' => '-g -O3 -mpowerpc -mcpu=powerpc',
             'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -O3 -mpowerpc -mcpu=powerpc',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
@@ -576,413 +649,363 @@ our $platforms = {
     },
 
 ##############################################################################
-# solaris9-x86
+# linux-x86_64-icc
 #
-    'solaris9-x86' => {
+    'linux-x86_64-icc' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
-            'CC' => 'cc',
-            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
-            'CXX' => 'CC',
+            'CFLAGS' => '-g -O3 -mp -restrict',
+            'CC' => 'icc  -static-intel -static-libgcc',
+            'CXXFLAGS' => '-g -O3 -mp -restrict',
+            'CXX' => 'icpc -static-intel -static-libgcc',
         },
         'opt' => {
-            '--with-named-curses' => '-lcurses',
+            '--with-fast-mutexes' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris8-sparc-32bit
+# linux-ia64-icc
 #
-    'solaris8-sparc-32bit' => {
+    'linux-ia64-icc' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8',
-            'CC' => 'cc-5.0',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
-            'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v8',
+            'CFLAGS' => '-g -O3 -mp -restrict -no-ftz',
+            'CC' => 'icc  -static-intel -static-libgcc',
+            'CXXFLAGS' => '-g -O3 -mp -restrict -no-ftz',
+            'CXX' => 'icpc -static-intel -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
-            '--enable-assembler' => undef,
-            '--with-named-curses-libs' => '-lcurses',
+            '--with-fast-mutexes' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-powerpc
+# linux-x86
 #
-    'linux-powerpc' => {
+    'linux-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -mpowerpc -mcpu=powerpc',
+            'CFLAGS' => '-g -O3',
             'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3 -mpowerpc -mcpu=powerpc',
+            'CXXFLAGS' => '-g -O3',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
             '--with-fast-mutexes' => undef,
+            '--enable-assembler' => undef,
         },
     },
 
 ##############################################################################
-# hpux11.11-hppa-32bit
-#
-    'hpux11.11-hppa-32bit' => {
-        'env' => {
-            'CFLAGS' => '-g +O1 +DAportable',
-            'CC' => 'cc',
-            'CPPFLAGS' => '-DDEFAULT_THREAD_STACK=262144',
-            'CXXFLAGS' => '-g +O1 +DAportable -Aa',
-            'CXX' => 'aCC',
-            'INSTALL' => '/usr/local/bin/install',
-        },
-        'opt' => {
-            '---with-yassl' => undef,
-        },
-    },
-
-##############################################################################
-# osx10.5-x86_64
+# linux-x86-valgrind
 #
-    'osx10.5-x86_64' => {
+    'linux-x86-valgrind' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch x86_64 -fno-common',
+            'CFLAGS' => '-O3 -g -fno-omit-frame-pointers -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify',
             'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -Os -arch x86_64 -felide-constructors -fno-common',
+            'CXXFLAGS' => '-O3 -g -fno-omit-frame-pointers -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
+            '--with-fast-mutexes' => undef,
         },
     },
 
 ##############################################################################
-# solaris10-x86
-#
-    'solaris10-x86' => {
-        'env' => {
-            'CFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic',
-            'CC' => 'cc',
-            'CXXFLAGS' => '-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic',
-            'CXX' => 'CC',
-        },
-        'opt' => {
-            '--with-mysqld-libs' => '-lmtmalloc',
-            '--with-named-curses' => '-lcurses',
-        },
-    },
-
-##############################################################################
-# hpux11.31-hppa-64bit
+# linux-x86-static
 #
-    'hpux11.31-hppa-64bit' => {
+    'linux-x86-static' => {
         'env' => {
-            'CFLAGS' => '+O2 +DD64',
-            'CC' => 'cc',
-            'LDFLAGS' => '+DD64',
-            'CXXFLAGS' => '+O2 +DD64 -Aa',
-            'CXX' => 'aCC',
-            'INSTALL' => '/usr/local/bin/install',
+            'CFLAGS' => '-g -O2 -mcpu=pentiumpro',
+            'CC' => 'gcc',
+            'CPPFLAGS' => '-I/usr/local/include -DDEFAULT_THREAD_STACK=126976',
+            'LDFLAGS' => '-L/usr/local/lib',
+            'CXXFLAGS' => '-g -O2 -mcpu=pentiumpro -felide-constructors',
+            'CXX' => 'gcc',
         },
         'opt' => {
-            '---with-yassl' => undef,
+            '--with-fast-mutexes' => undef,
+            '--enable-assembler' => undef,
+            '--with-client-ldflags' => '-all-static',
+            '--with-mysqld-ldflags' => '-all-static',
+            '!--with-zlib-dir' => undef,
         },
     },
 
 ##############################################################################
-# osx10.5-powerpc-32bit
+# linux-x86-icc
 #
-    'osx10.5-powerpc-32bit' => {
+    'linux-x86-icc' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch ppc -fno-common',
-            'CC' => 'gcc -static-libgcc',
-            'LDFLAGS' => '-arch ppc',
-            'CXXFLAGS' => '-g -Os -arch ppc -felide-constructors -fno-common',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -O3 -mp -restrict',
+            'CC' => 'icc  -static-intel -static-libgcc',
+            'CXXFLAGS' => '-g -O3 -mp -restrict',
+            'CXX' => 'icpc -static-intel -static-libgcc',
         },
         'opt' => {
+            '--with-fast-mutexes' => undef,
+            '--enable-assembler' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris9-sparc-32bit
+# linux-s390x
 #
-    'solaris9-sparc-32bit' => {
+    'linux-s390x' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8',
-            'CC' => 'cc-5.0',
-            'LDFLAGS' => '-xarch=v8',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
-            'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v8',
+            'CFLAGS' => '-g -O2',
+            'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -O2 -felide-constructors',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--enable-assembler' => undef,
-            '--with-named-curses-libs' => '-lcurses',
+            '--with-fast-mutexes' => undef,
         },
     },
 
 ##############################################################################
-# solaris9-sparc-64bit
+# linux-ia64
 #
-    'solaris9-sparc-64bit' => {
+    'linux-ia64' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9',
-            'CC' => 'cc-5.0',
-            'LDFLAGS' => '-xarch=v9',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v9',
-            'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v9',
+            'CC' => 'gcc -static-libgcc',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
+            '--with-fast-mutexes' => undef,
         },
     },
 
 ##############################################################################
-# linux-x86_64-icc
+# osx10.5-x86_64
 #
-    'linux-x86_64-icc' => {
+    'osx10.5-x86_64' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -mp -restrict',
-            'CC' => 'icc  -static-intel -static-libgcc',
-            'CXXFLAGS' => '-g -O3 -mp -restrict',
-            'CXX' => 'icpc -static-intel -static-libgcc',
+            'CFLAGS' => '-g -Os -arch^x86_64 -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -Os -arch^x86_64 -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# hpux11.00-hppa-64bit
+# osx10.5-powerpc-32bit
 #
-    'hpux11.00-hppa-64bit' => {
+    'osx10.5-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g +O2 +DD64',
-            'CC' => 'cc',
-            'LDFLAGS' => '+DD64',
-            'CXXFLAGS' => '-g +O2 +DD64 -Aa',
-            'CXX' => 'aCC',
+            'CFLAGS' => '-g -Os -arch^ppc -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'LDFLAGS' => '-arch^ppc',
+            'CXXFLAGS' => '-g -Os -arch^ppc -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# aix4.3-powerpc-32bit
+# osx10.5-powerpc-64bit
 #
-    'aix4.3-powerpc-32bit' => {
+    'osx10.5-powerpc-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'CC' => 'xlc_r',
-            'CXXFLAGS' => '-g -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192',
-            'CXX' => 'xlC_r',
+            'CFLAGS' => '-g -Os -arch^ppc64 -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'LDFLAGS' => '-arch^ppc64',
+            'CXXFLAGS' => '-g -Os -arch^ppc64 -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris8-sparc-32bit-gcc
+# osx10.5-x86
 #
-    'solaris8-sparc-32bit-gcc' => {
+    'osx10.5-x86' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -DHAVE_MYSYS_NEW',
-            'CC' => 'gcc',
-            'CXXFLAGS' => '-g -xO3 -DHAVE_MYSYS_NEW',
-            'CXX' => 'gcc',
+            'CFLAGS' => '-g -Os -arch^i386 -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -Os -arch^i386 -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
-            '--enable-assembler' => undef,
-            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
 ##############################################################################
-# hpux11.23-ia64
+# osx10.4-powerpc-64bit
 #
-    'hpux11.23-ia64' => {
+    'osx10.4-powerpc-64bit' => {
         'env' => {
-            'CFLAGS' => '-g +O2 +DD64 +DSitanium2 -mt -AC99 -DPTHREAD_COMPAT_MODE -O1',
-            'CC' => 'cc',
-            'LDFLAGS' => '+DD64',
-            'CXXFLAGS' => '-g +O2 +DD64 +DSitanium2 -mt -DPTHREAD_COMPAT_MODE -O1 -Aa',
-            'CXX' => 'aCC',
+            'CFLAGS' => '-g -Os -arch^ppc64 -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'LDFLAGS' => '-arch^ppc64',
+            'CXXFLAGS' => '-g -Os -arch^ppc64 -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-ia64-icc
+# osx10.4-x86
 #
-    'linux-ia64-icc' => {
+    'osx10.4-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O3 -mp -restrict -no-ftz',
-            'CC' => 'icc  -static-intel -static-libgcc',
-            'CXXFLAGS' => '-g -O3 -mp -restrict -no-ftz',
-            'CXX' => 'icpc -static-intel -static-libgcc',
+            'CFLAGS' => '-g -Os -arch^i386 -fno-common',
+            'CC' => 'gcc -static-libgcc',
+            'CXXFLAGS' => '-g -Os -arch^i386 -felide-constructors -fno-common',
+            'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
-            '---with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-x86
+# osx10.4-powerpc-32bit
 #
-    'linux-x86' => {
+    'osx10.4-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -O3',
+            'CFLAGS' => '-g -Os -arch^ppc -fno-common',
             'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3',
+            'CXXFLAGS' => '-g -Os -arch^ppc -felide-constructors -fno-common',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
-            '--enable-assembler' => undef,
         },
     },
 
 ##############################################################################
-# solaris8-sparc-64bit-gcc
+# osx10.3-powerpc-32bit
 #
-    'solaris8-sparc-64bit-gcc' => {
+    'osx10.3-powerpc-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -O -m64',
+            'CFLAGS' => '-g -O3 -fno-common',
             'CC' => 'gcc -static-libgcc',
-            'LDFLAGS' => '-m64',
-            'CXXFLAGS' => '-g -O3 -DHAVE_MYSYS_NEW -m64',
+            'CXXFLAGS' => '-g -O3 -fno-common',
             'CXX' => 'gcc -static-libgcc',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
-            '--with-named-curses-libs' => '-lcurses',
         },
     },
 
+
 ##############################################################################
-# freebsd6.0-x86_64
+# qnx6.2.1-x86
 #
-    'freebsd6.0-x86_64' => {
+    'qnx6.2.1-x86' => {
         'env' => {
-            'CFLAGS' => '-g -O3',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-g -O3',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g -O1 -D_FILE_OFFSET_BITS=64 -Wl,-E',
+            'CC' => 'qcc',
+            'CONFIG_SHELL' => '/usr/bin/bash',
+            'CXXFLAGS' => '-g -O1 -D_FILE_OFFSET_BITS=64 -Wl,-E',
+            'CXX' => 'qcc',
         },
         'opt' => {
-            '--with-machine-type' => 'x86_64',
-            '--enable-assembler' => undef,
+            '--without-csv-storage-engine' => undef,
         },
     },
 
 ##############################################################################
-# hpux11.11-hppa-64bit
+# openserver6-x86
 #
-    'hpux11.11-hppa-64bit' => {
+    'openserver6-x86' => {
         'env' => {
-            'CFLAGS' => '+O2 +DD64',
+            'CFLAGS' => '-D_FILE_OFFSET_BITS=64 optO -DDBUG_OFF -Kalloca',
             'CC' => 'cc',
-            'LDFLAGS' => '+DD64',
-            'CXXFLAGS' => '+O2 +DD64 -Aa',
-            'CXX' => 'aCC',
-            'INSTALL' => '/usr/local/bin/install',
+            'CXXFLAGS' => '-D_FILE_OFFSET_BITS=64 optO3 -DDBUG_OFF -Kalloca -Kalloca -Tno_implicit',
+            'CXX' => 'CC',
         },
         'opt' => {
-            '---with-yassl' => undef,
+            '--build' => 'i686-unknown-sysv5SCO_SV6.0.0',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# i5os-power-32bit
+# hpux11.31-hppa-32bit
 #
-    'i5os-power-32bit' => {
+    'hpux11.31-hppa-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
-            'CC' => 'xlc_r',
-            'LDFLAGS' => '-Wl,-brtl',
-            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
-            'CXX' => 'xlC_r',
+            'CFLAGS' => '-g +O1 +DAportable',
+            'CC' => 'cc',
+            'CPPFLAGS' => '-DDEFAULT_THREAD_STACK=262144',
+            'CXXFLAGS' => '-g +O1 +DAportable -Aa',
+            'CXX' => 'aCC',
+            'INSTALL' => '/usr/local/bin/install',
         },
         'opt' => {
-            '--with-machine-type' => 'power',
-            '--with-named-z-libs' => 'no',
-            '--build' => 'powerpc-ibm-aix5.3.0.0',
-            '--with-system-type' => 'ibm-i5os',
-            '--host' => 'powerpc-ibm-aix5.3.0.0',
-            '---with-yassl' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# solaris10-sparc-32bit
+# hpux11.11-hppa-32bit
 #
-    'solaris10-sparc-32bit' => {
+    'hpux11.11-hppa-32bit' => {
         'env' => {
-            'CFLAGS' => '-g -xO3 -Xa -xstrconst -mt -D_FORTEC_ -xarch=v8 -xc99=none',
-            'CC' => 'cc-5.0',
-            'LDFLAGS' => '-xarch=v8',
-            'CXXFLAGS' => '-g -xO3 -noex -mt -D_FORTEC_ -xarch=v8',
-            'CXX' => 'CC',
-            'ASFLAGS' => '-xarch=v8',
+            'CFLAGS' => '-g +O1 +DAportable',
+            'CC' => 'cc',
+            'CPPFLAGS' => '-DDEFAULT_THREAD_STACK=262144',
+            'CXXFLAGS' => '-g +O1 +DAportable -Aa',
+            'CXX' => 'aCC',
+            'INSTALL' => '/usr/local/bin/install',
         },
         'opt' => {
-            '--with-mysqld-libs' => '-lmtmalloc',
-            '--with-named-z-libs' => 'no',
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# osx10.5-powerpc-64bit
+# hpux11.31-hppa-64bit
 #
-    'osx10.5-powerpc-64bit' => {
+    'hpux11.31-hppa-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -Os -arch ppc64 -fno-common',
-            'CC' => 'gcc -static-libgcc',
-            'LDFLAGS' => '-arch ppc64',
-            'CXXFLAGS' => '-g -Os -arch ppc64 -felide-constructors -fno-common',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '+O2 +DD64',
+            'CC' => 'cc',
+            'LDFLAGS' => '+DD64',
+            'CXXFLAGS' => '+O2 +DD64 -Aa',
+            'CXX' => 'aCC',
+            'INSTALL' => '/usr/local/bin/install',
         },
         'opt' => {
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# linux-x86-valgrind
+# hpux11.23-ia64
 #
-    'linux-x86-valgrind' => {
+    'hpux11.23-ia64' => {
         'env' => {
-            'CFLAGS' => '-O3 -g -fno-omit-frame-pointers -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify',
-            'CC' => 'gcc -static-libgcc',
-            'CXXFLAGS' => '-O3 -g -fno-omit-frame-pointers -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify',
-            'CXX' => 'gcc -static-libgcc',
+            'CFLAGS' => '-g +O2 +DD64 +DSitanium2 -mt -AC99 -DPTHREAD_COMPAT_MODE -O1',
+            'CC' => 'cc',
+            'LDFLAGS' => '+DD64',
+            'CXXFLAGS' => '-g +O2 +DD64 +DSitanium2 -mt -DPTHREAD_COMPAT_MODE -O1 -Aa',
+            'CXX' => 'aCC',
         },
         'opt' => {
-            '--with-fast-mutexes' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
 ##############################################################################
-# aix5.2-powerpc-32bit
+# hpux11.11-hppa-64bit
 #
-    'aix5.2-powerpc-32bit' => {
+    'hpux11.11-hppa-64bit' => {
         'env' => {
-            'CFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
-            'CC' => 'xlc_r',
-            'LDFLAGS' => '-Wl,-brtl',
-            'CXXFLAGS' => '-g -ma -qstrict -qoptimize=0 -qmaxmem=8192',
-            'CXX' => 'xlC_r',
+            'CFLAGS' => '+O2 +DD64',
+            'CC' => 'cc',
+            'LDFLAGS' => '+DD64',
+            'CXXFLAGS' => '+O2 +DD64 -Aa',
+            'CXX' => 'aCC',
+            'INSTALL' => '/usr/local/bin/install',
         },
         'opt' => {
-            '--with-named-z-libs' => 'no',
-            '---with-yassl' => undef,
+            '!--with-yassl' => undef,
         },
     },
 
@@ -1015,75 +1038,135 @@ our $platforms = {
 # No configuration below this line.                                          #
 ##############################################################################
 
+#
+# aggregate()
+#
+# This is the main work horse of this script, merging two configuration hashes
+# as per the rules outlined above. 
+#
+# Input:   Current configuration hash, modification hash
+# Returns: New merged configuration hash
+#
 sub aggregate {
     my ($config, $mod) = @_;
+    # merge environment variable settings, create if the current configuration
+    # does not contain any
     $config->{"env"} = {} unless defined $config->{"env"};
     for my $key (keys %{$mod->{"env"}}) {
         my $p = $mod->{"env"}->{$key};
         my $parts = [];
         if(ref($p)) {
+            # if not a scalar, assume it's already a list of values
             $parts = $p;
         } else {
-            $parts = [ split / +/, $p ];
+            # otherwise, split on blank to create a list of values
+            $parts = [ map { y/^/ /; $_ } split / +/, $p ];
         }
+        # determine the mode by which to apply this individual change
+        # the default is replacing any existing variable with the new content
         my $mode = "replace";
         if($key =~ /^\+/) {
+            # if the variable name is prefixed with a +, change mode to 
+            # adding parts
             $mode = "add";
             $key = substr($key, 1);
         } elsif($key =~ /^-/) {
+            # if the variable name is prefixed with a -, change mode to
+            # removing parts
             $mode = "sub";
             $key = substr($key, 1);
         }
         if($mode eq "replace") {
+            # replace mode: 
+            # just overwrite settings with the list determined above
             $config->{"env"}->{$key} = $parts;
         } else {
+            # not replacing: 
+            # make sure the variable exists
             if(!defined $config->{"env"}->{$key}) {
                 $config->{"env"}->{$key} = [];
             }
+            # copy values from the existing variable by putting all parts
+            # into the tmp hash
             my %tmp = ();
             @tmp{@{$config->{"env"}->{$key}}} = ();
+            # remove all parts from tmp hash that are also in the parts list
+            # as determined above
             for my $val (@$parts) {
                 delete $tmp{$val};
             }
+            # replace the values in the current configuration with the 
+            # remaining values
             $config->{"env"}->{$key} = [ sort keys %tmp ];
             if($mode eq "add") {
+                # if we are adding, add newly added parts to the end of
+                # the values list in the current configuration
                 for my $val (@$parts) {
                     push @{$config->{"env"}->{$key}}, $val;
                 }
             } 
         }
     }
+    # merge configure options; first make sure that the current configuration
+    # hash has configure options
     $config->{"opt"} = {} unless defined $config->{"opt"};
     for my $key (keys %{$mod->{"opt"}}) {
         my $val = $mod->{"opt"}->{$key};
-        if($key =~ /^---/) {
-          delete $config->{"opt"}->{substr($key,1)};
-          next;
+        if($key =~ /^!/) {
+            # if the name of the option is prefixed with a !, remove it from
+            # the current configuration if it exists
+            delete $config->{"opt"}->{substr($key,1)};
+            # continue with the next option, we are done here
+            next;
         } elsif($key =~ /^--with-(.*)$/) {
+            # if the name of the option starts with --with-, remove any
+            # corresponding option starting with --without-.
             delete $config->{"opt"}->{"--without-$1"};
         } elsif($key =~ /^--without-(.*)$/) {
+            # if the name of the option starts with --without-, remove any
+            # corresponding option starting with --with-
             delete $config->{"opt"}->{"--with-$1"};
         }
+        # replace the value of the configure option with the new value,
+        # or add it if it does not already exist
         $config->{"opt"}->{$key} = $val;
     }
+    # merge windows-style options; first make sure the current configuration
+    # hash contains windows options
     $config->{"win"} = {} unless defined $config->{"win"};
     for my $key (keys %{$mod->{"win"}}) {
         my $val = $mod->{"win"}->{$key};
-        if($key =~ /^-/) {
-          delete $config->{"win"}->{substr($key,1)};
-          next;
+        if($key =~ /^!/) {
+            # if the name of the option is prefixed with a !, remove it from
+            # the current configuration if it exists
+            delete $config->{"win"}->{substr($key,1)};
+            # continue with the next option, we are done here
+            next;
         }
+        # replace the value of the configure option with the new value,
+        # or add it if it does not already exist
         $config->{"win"}->{$key} = $val;
     }
 }
 
+#
+# create_configure_line()
+#
+# Create a configure line from a configuration hash.
+#
+# Input:   a configuration hash
+# Returns: a string containing a configure invocation
+#
 sub create_configure_line {
-    my ($config, $vars) = @_;
+    my ($config) = @_;
     my $ln = "";
-    if($vars->{"windows"}) {
+    if($config->{"windows"}) {
+        # if we are building a windows configure line, start with the
+        # call to win/configure.js
         $ln .= "cscript win/configure.js";
         for my $win (sort keys %{$config->{"win"}}) {
             $ln .= " ";
+            # now, we simply add all the options to the command line
             if(defined $config->{"win"}->{$win}) {
                 my $val = $config->{"win"}->{$win};
                 $ln .= "$win='$val'";
@@ -1091,35 +1174,58 @@ sub create_configure_line {
                 $ln .= "$win";
             }
         }
+        # we're done already
         return $ln;
     }
+    # for other targets, we need to sort out the environment settings first
     for my $var (sort keys %{$config->{"env"}}) {
         $ln .= " " unless $ln eq "";
+        # join all parts of this variable together, delimited by blanks
         my $val = join " ", @{$config->{"env"}->{$var}};
+        # put the value in single quotes and add the setting to the command 
+        # line we're building
         $ln .= "$var='$val'";
     }
     $ln .= " " unless $ln eq "";
+    # add the configure command, followed by its options
     $ln .= "./configure";
     for my $opt (sort keys %{$config->{"opt"}}) {
         $ln .= " ";
         if(defined $config->{"opt"}->{$opt}) {
+            # if there is a value, put it in single quotes and add
+            # the option so as to set it to that value
             my $val = $config->{"opt"}->{$opt};
             $ln .= "$opt='$val'";
         } else {
+            # if there is no value, just add the option name
             $ln .= "$opt";
         }
     }
     return $ln;
 }
 
+#
+# print_config()
+#
+# Prints out a summary of what it is going to do, and the complete
+# configure command.
+#
+# Input:  a configuration hash
+# Output: some #-prefixed human-readable comments and a command fit for 
+#         piping into a UNIX-style shell
+#
 sub print_config {
-    my ($config, $vars) = @_;
+    my ($config) = @_;
+    # assemble the platform name by adding "(debug)" if a debug build
+    # was requested
     print "#\n# configuring for " . $config->{"platform"};
     if($config->{"debug"}) {
         print " (debug)";
     }
     print "\n#\n";
-    if($vars->{"windows"}) {
+    if($config->{"windows"}) {
+        # if we are building for windows, we lust list all the windows-style
+        # configure options, one line per option
         for my $win (sort keys %{$config->{"win"}}) {
             if(defined $config->{"win"}->{$win}) {
                 my $val = $config->{"win"}->{$win};
@@ -1129,11 +1235,14 @@ sub print_config {
             }
         }
     } else {
+        # for UNIX builds, we list the environment variables, one line
+        # per setting...
         for my $var (sort keys %{$config->{"env"}}) {
             my $val = join " ", @{$config->{"env"}->{$var}};
             print "# $var='$val'\n";
         }
         print "#\n";
+        # ...followed by the configure options, one line per option
         for my $opt (sort keys %{$config->{"opt"}}) {
             if(defined $config->{"opt"}->{$opt}) {
                 my $val = $config->{"opt"}->{$opt};
@@ -1144,13 +1253,17 @@ sub print_config {
         }
     }
     print "#\n";
-    print create_configure_line($config, $vars) . "\n";
+    # finall, the complete configure command is printed as well
+    print create_configure_line($config) . "\n";
 }
 
 ##############################################################################
 
+# if @ARGV is empty, return early, indicating success; assuming that
+# we're running as a library
 return 1 unless @ARGV;
 
+# initialize command-line options with some sensible defaults
 my $vars = {
     'debug' =>          0,
     'ccache' =>         0,
@@ -1163,28 +1276,40 @@ my $vars = {
     'product' =>        "community",
 };
 
+# process arguments in @ARGV
 while(@ARGV) {
     my $arg = shift;
     if($arg =~ /^--/) {
+        # on hitting "--", stop processing arguments and leave remaining
+        # arguments in @ARGV
         last if $arg eq "--";
         my $var = substr($arg, 2);
         if(defined $vars->{$var}) {
+            # if a known command line option from $vars is specified, 
+            # overwrite previous setting with new setting, or add 1 if
+            # no value is specified
             if($vars->{$var} =~ /^[0-9]+$/) {
                 $vars->{$var} += 1;
             } else {
                 $vars->{$var} = shift;
             }
         } else {
+            # anything not in the $vars hash is not accepted as an
+            # option to preconfigure
             print STDERR "unrecognized option: $arg\n";
             exit 1;
         }
     }
 }
 
+# if the platform name looks like windows, set the windows flag
+# to default to building a windows configure.js command line
 if($vars->{"platform"} =~ /^windows-/) {
     $vars->{"windows"} = 1;
 }
 
+# go through the remaining arguments in @ARGV, gathering parts
+# that should be added to the configuration 
 my $pass_on = { "opt" => {}, "win" => {} };
 while(@ARGV) {
     my $arg = shift;
@@ -1200,53 +1325,70 @@ while(@ARGV) {
     }
 }
 
+# if --list-platforms was specified, print list of platforms and exit
 if($vars->{"list-platforms"}) {
     for my $name (sort keys %$platforms) {
         print "$name\n";
     }
+    exit 0;
 }
+
+# if --llist-products was specified, print list of products and exit
 if($vars->{"list-products"}) {
     for my $name (sort keys %$products) {
         print "$name\n";
     }
+    exit 0;
 }
 
+# if an unknown platform was specified, print an error and die
 if(!defined $platforms->{$vars->{"platform"}}) {
     print STDERR "requested platform is unknown; please use --list-platforms to see available choices\n";
     exit 1;
 }
 
+# if an unknown product was specified, print an error and die
 if(!defined $products->{$vars->{"product"}}) {
     print STDERR "requested product is unknown; please use --list-products to see available choices\n";
     exit 1;
 }
 
+# start with a clean configuration hash
+# we're using the $vars hash to simplify access to command-line options
 my $config = $vars;
+# merge default settings
 aggregate($config, $default);
+# merge product settings for the requeted product
 aggregate($config, $products->{$vars->{"product"}});
+# merge platform settings
 aggregate($config, $platforms->{$vars->{"platform"}});
+# if building a debug executable, merge debug settings
 if($vars->{"debug"}) {
     aggregate($config, $debug);
 }
+# merge settings from the preconfigure command line
 aggregate($config, $pass_on);
+# finally, if ccache was requested, prefix CC and CXX with "ccache"
 if($vars->{"ccache"}) {
     unshift @{$config->{"env"}->{"CC"}}, "ccache"; 
     unshift @{$config->{"env"}->{"CXX"}}, "ccache"; 
 }
 
+# If --print was specified, print the configuration
 if($vars->{"print"}) {
     if($vars->{"platform"} eq "") {
         print STDERR "please use --platform <platform name>\n";
         exit 1;
     }
-    print_config($config, $vars);
+    print_config($config);
 }
 
+# If --configure was specified, run the appropriate configuration command
 if($vars->{"configure"}) {
     if($vars->{"platform"} eq "") {
         print STDERR "please use --platform <platform name>\n";
         exit 1;
     }
-    system(create_configure_line($config, $vars));
+    system(create_configure_line($config));
 }
 

Thread
bzr push into mysql-5.0 branch (df:2659 to 2663) Daniel Fischer21 Oct