~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to BUILD/build_mccge.sh

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
 
3
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
4
#
 
5
# This program is free software; you can redistribute it and/or
 
6
# modify it under the terms of the GNU Library General Public
 
7
# License as published by the Free Software Foundation; version 2
 
8
# of the License.
 
9
#
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
# Library General Public License for more details.
 
14
#
 
15
# You should have received a copy of the GNU Library General Public
 
16
# License along with this library; if not, write to the Free
 
17
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
18
# MA 02111-1307, USA
 
19
 
3
20
die()
4
21
{
5
22
  echo "ERROR: $@"; exit 1;
63
80
cat <<EOF
64
81
 
65
82
  This script can be used to build MySQL Cluster Carrier Grade Edition
66
 
  based on a source code release you received from MySQL.
 
83
  based on a source code release you received from MySQL. It can also
 
84
  be used to build many variants other variants of MySQL, in particular
 
85
  various performance-optimised versions of MySQL.
67
86
 
68
87
  It is assumed that you are building on a computer which is of the 
69
 
  same type as that on which you intend to run MySQL Cluster.
 
88
  same type as that on which you intend to run MySQL/MySQL Cluster.
70
89
 
71
90
  The simplest possible way to run this script is to allow it to use the 
72
 
  built-in defaults everywhere, invoking it simply as:
 
91
  built-in defaults everywhere, invoking it simply as (from top-level
 
92
  MySQL directory):
73
93
 
74
 
  shell> ./build_mccge.sh
 
94
  shell> BUILD/build_mccge.sh
75
95
 
76
96
  This performs the following operations:
77
97
    1) Detects the operating system. Currently, Linux, FreeBSD, Solaris 
78
 
      10/11, and Mac OS X are supported by this script.
 
98
      8/9/10/11, and Mac OS X are supported by this script.
79
99
    2) Detect the type of CPU being used. Currently supported processors 
80
100
      are: x86 for all supported operating systems, Itanium for Linux 
81
 
      with GCC, and SPARC for Solaris using the Forte compiler.
 
101
      with GCC, and x86 + SPARC for Solaris using the Forte compiler and
 
102
      finally x86 on Linux using the Intel compiler.
82
103
    3) Invokes the GCC compiler.
83
 
    4) Builds a set of MySQL Cluster Carrier Grade Edition binaries; for
 
104
    4) Builds a set of MySQL/MySQL Cluster binaries; for
84
105
      more information about these, see --extended-help.
 
106
    5) Default compiler is always gcc.
85
107
  
86
108
  The default version assumes that you have a source code tarball from 
87
109
  which you are building, and thus autoconf and automake do not need to 
88
110
  be run. If you have downloaded a BitKeeper tree then you should read 
89
111
  --developer-help.
90
112
 
91
 
  If you are building MySQL Cluster Carrier Grade Edition for commercial 
 
113
  If you are building MySQL/MySQL Cluster for commercial 
92
114
  use then you need to set the --commercial flag to ensure that the 
93
115
  commercial libraries are compiled in, rather than the GPL-only 
94
116
  libraries. The default is to build a GPL version of MySQL Cluster 
95
117
  Carrier Grade Edition.
96
118
 
97
 
  If your building on a Solaris SPARC machine you must set 
 
119
  If your building on a Solaris SPARC machine and you want to compile
 
120
  using SunStudio you must set 
98
121
  --compiler=forte; if you want to build using the Intel compiler on 
99
122
  Linux, you need to set --compiler=icc.
100
123
 
 
124
  A synonym for forte is SunStudio, so one can also use
 
125
  --compiler=SunStudio.
 
126
 
101
127
  If you want to make sure that a 64-bit version is built then you 
102
128
  should add the flag --64. This is always set on Solaris machines and 
103
129
  when check-cpu is able to discover that a 64-bit CPU is being used. If 
120
146
  information in the binary then use --debug.
121
147
 
122
148
  If your aim is not to build MySQL Cluster Carrier Grade Edition, you 
123
 
  can also use this script to build MySQL Classic and MySQL Pro 
 
149
  can also use this script to build MySQL Classic and MySQL Enterprise Pro 
124
150
  versions; see the --extended-help for descriptions of these packages.
125
151
EOF
126
152
}
133
159
  --help                  Show this help message.
134
160
  --sysadmin-help         Show help for system administrators wishing 
135
161
                          to build MySQL Cluster Carrier Grade Edition
 
162
                          or other MySQL versions.
136
163
  --developer-help        Show help for developers trying to build MySQL
137
164
  --with-help             Show extended help on --with-xxx options to 
138
165
                          configure
139
166
  --extended-help         Show extended help message
140
167
  --without-debug         Build non-debug version
 
168
  --use-comment           Set the comment in the build
 
169
  --with-fast-mutexes     Use try/retry method of acquiring mutex
141
170
  --with-debug            Build debug version
142
171
  --with-debug=full       Build with full debug.
 
172
  --with-link-time-optimizer
 
173
                          Link time optimizations enabled (Requires GCC 4.5
 
174
                          if GCC used), available for icc as well. This flag
 
175
                          is only considered if also fast is set.
143
176
  --configure-only        Stop after running configure.
144
177
  --use-autotools         Start by running autoconf, automake,.. tools
145
178
  --no-autotools          Start from configure
155
188
                          MySQL use
156
189
  --commercial            Use commercial libraries
157
190
  --gpl                   Use gpl libraries
158
 
  --compiler=[gcc|icc|forte]                  Select compiler
159
 
  --cpu=[x86|x86_64|sparc]                    Select CPU type
160
 
                          x86 => 32-bit binary
161
 
                          x86_64 => 64 bit binary unless Mac OS X
 
191
  --compiler=[gcc|icc|forte|SunStudio]        Select compiler
 
192
  --cpu=[x86|x86_64|sparc|itanium]            Select CPU type
 
193
                          x86 => x86 and 32-bit binary
 
194
                          x86_64 => x86 and 64 bit binary
162
195
  --warning-mode=[extra|pedantic|normal|no]   Set warning mode level
163
196
  --warnings              Set warning mode to normal
164
197
  --32                    Build a 32-bit binary even if CPU is 64-bit
170
203
  --error-inject          Enable error injection into MySQL Server and 
171
204
                          data nodes
172
205
  --valgrind              Build with valgrind
173
 
  --fast                  Optimise for CPU architecture buildt on
 
206
  --fast                  Optimise for CPU architecture built on
174
207
  --static-linking        Statically link system libraries into binaries
 
208
  --use-tcmalloc          Link with tcmalloc instead of standard malloc (Linux only)
175
209
  --with-flags *          Pass extra --with-xxx options to configure
176
210
EOF
177
211
  if test "x$1" != "x" ; then
186
220
  Extended help text for this script:
187
221
  -----------------------------------
188
222
  This script is intended to make it easier for customers using MySQL
189
 
  Cluster Carrier Grade Edition to build the product from source on 
190
 
  these platforms/compilers: Linux/x86 (32-bit and 64-bit),
191
 
  Solaris 10 and 11/x86/gcc, Solaris 9/Sparc/Forte, and MacOSX/x86/gcc. 
192
 
  The script automatically detects CPU type and operating system; in 
193
 
  most cases this also determines which compiler to use, the exception 
194
 
  being Linux/x86 where you can choose between gcc and icc (gcc is the
195
 
  default).
 
223
  Cluster Carrier Grade Edition, customers using performance-optimised
 
224
  MySQL versions and developers to build the product from source on 
 
225
  these platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using
 
226
  gcc or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
 
227
  gcc or SunStudio and MacOSX/x86/gcc.
 
228
 
 
229
  The script automatically detects CPU type and operating system; The
 
230
  default compiler is always gcc.
196
231
 
197
232
  To build on other platforms you can use the --print-only option on a
198
233
  supported platform and edit the output for a proper set of commands on
213
248
 
214
249
  --package=cge
215
250
    storage engines:
216
 
      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, MYISAM, NDB
 
251
      ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, NDB
217
252
      (All storage engines except InnoDB)
218
253
    comment: MySQL Cluster Carrier Grade Edition GPL/Commercial version 
219
254
             built from source
221
256
 
222
257
  --package=extended
223
258
    storage engines:
224
 
      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, MYISAM, INNODB, NDB
 
259
      ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, INNODB, NDB
225
260
      (All storage engines)
226
261
    comment: MySQL Cluster Carrier Grade Extended Edition GPL/Commercial 
227
262
             version built from source
229
264
 
230
265
  --package=pro
231
266
    storage engines:
232
 
      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, INNODB, MYISAM
 
267
      ARCHIVE, BLACKHOLE, CSV, FEDERATED, INNODB, MYISAM
233
268
      (All storage engines except NDB)
234
269
    comment: MySQL Pro GPL/Commercial version built from 
235
270
             source
291
326
    by MySQL (cannot be overridden).
292
327
 
293
328
  --with-ssl: Enable use of yaSSL library included in the MySQL source
 
329
    if possible (GCC and same CC and CXX).
294
330
    (cannot be overridden).
295
331
 
296
332
  --with-pic: Build all binaries using position independent assembler
297
333
    to avoid problems with dynamic linkers (cannot be overridden).
298
334
 
 
335
  --without-example-engine: Ensure that the example engine isn't built,
 
336
    it cannot do any useful things, it's merely intended as documentation.
 
337
    (cannot be overridden)
 
338
 
299
339
  --with-csv-storage-engine: Ensure that the CSV storage engine is
300
340
    included in all builds. Since CSV is required for log tables in
301
341
    MySQL 5.1, this option cannot be overridden.
314
354
  In addition there are some configure options that are specific to
315
355
  Linux operating systems:
316
356
 
317
 
  --with-fast-mutexes
318
 
    Include an alternative implementation of mutexes that is faster on
319
 
    Linux systems
320
 
 
321
357
  --enable-assembler
322
358
    Include assembler code optimisations for a number of mostly string
323
359
    methods. Used for x86 processors only.
364
400
 
365
401
  --with-mysqld-libs=-lmtmalloc
366
402
    Used on Solaris to ensure that the proper malloc library is used.
 
403
    Investigations have shown mtmalloc to be the best choice on Solaris,
 
404
    also umem has good performance on Solaris but better debugging
 
405
    capabilities.
367
406
 
368
407
  Compiler options:
369
408
  -----------------
370
409
 
371
 
  This section describes the compiler options for each of the different
372
 
  platforms supported by thisscript.
373
 
 
374
 
  The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
375
 
  support for Nocona, K8, and other processors).
376
 
 
377
 
  Use of the --debug option adds -g to the C/C++ flags.
 
410
    This section describes the compiler options for each of the different
 
411
    platforms supported by this script.
 
412
 
 
413
    The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
 
414
    support for Nocona, K8, and other processors).
 
415
 
 
416
    Use of the --debug option adds -g to the C/C++ flags.
 
417
 
 
418
    In all cases it is possible to override the definition of CC and CXX
 
419
    by calling the script as follows:
 
420
    CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
378
421
 
379
422
  FreeBSD/x86/gcc
380
423
  ---------------
383
426
 
384
427
  Linux/x86+Itanium/gcc
385
428
  -------------
386
 
    No flags are used. Instead the configure script determines the
387
 
    proper flags to use for both normal and debug builds. Discovery of a
 
429
    For debug builds -O is used and otherwise -O3 is used.Discovery of a
388
430
    Nocona or Core 2 Duo CPU causes a 64-bit binary to be built;
389
431
    otherwise, the binary is 32-bit. To build a 64-bit binary, -m64 is
390
432
    added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU,
393
435
  Linux/x86+Itanium/icc
394
436
  -------------
395
437
    Flags used:
396
 
    CC  = icc -static-libgcc -static-libcxa -i-static
397
 
    C++ = icpc -static-libgcc -static-libcxa -i-static
 
438
    CC  = icc -static-libgcc -static-intel
 
439
    C++ = icpc -static-libgcc -static-intel
398
440
    C/C++ flags = -mp -restrict
399
441
 
400
 
    On Itanium we also add -no-ftz and -no-prefetch to CC and C++ flags.
401
 
 
402
 
  The non-debug versions also add the following:
403
 
    C/C++ flags += -O3 unroll2 -ip
404
 
 
405
 
  The fast version adds:
406
 
    C/C++ flags += -ipo
407
 
 
408
 
  On discovery of a Core 2 Duo architecture while using icc, -xT is also 
409
 
  added to the C/C++ flags; this provides optimisations specific to Core 
410
 
  2 Duo. This is added only when the --fast flag is set.
 
442
    On Itanium we also add -no-ftz and to CC and C++ flags.
 
443
 
 
444
    Note that if the user of this script sets CC or CXX explicitly then
 
445
    also -static-libgcc and -static-intel needs to be set in the CC and
 
446
    CXX.
 
447
 
 
448
    The non-debug versions also add the following:
 
449
      C/C++ flags += -O3 unroll2 -ip
 
450
 
 
451
    The fast version adds (if --with-link-time-optimizer is used):
 
452
      C/C++ flags += -ipo
 
453
 
 
454
    On discovery of a Core 2 Duo architecture while using icc, -xT is also 
 
455
    added to the C/C++ flags; this provides optimisations specific to Core 
 
456
    2 Duo. This is added only when the --fast flag is set.
411
457
 
412
458
  Solaris/x86/gcc
413
459
  ---------------
414
 
    All builds on Solaris are 64-bit, so -m64 is always used in the
415
 
    C/C++ flags. LDFLAGS is set to -m64 -static-libgcc -O/-O2.
 
460
    All builds on Solaris are by default 64-bit, so -m64 is always used in
 
461
    the C/C++ flags. LDFLAGS is set to -m64 -O/-O2/-O3. If for
 
462
    some reason a 32-bit Solaris is used it is necessary to add the flag
 
463
    --32 to the script invocation. Due to bugs in compiling with -O3 on
 
464
    Solaris only -O2 is used by default, when --fast flag is used -O3 will
 
465
    be used instead.
 
466
 
 
467
    Sets -m64 (default) or -m32 (if specifically set) in LDFLAGS and
 
468
    C/C++ flags.
416
469
 
417
470
  Solaris/Sparc/Forte
418
471
  -------------------
419
 
    Uses cc-5.0 as CC
420
 
    Sets ASFLAGS=LDFLAGS=xarch=v9, so that we compile Sparc v9 binaries
421
 
    C flags   = -Xa -strconst -xc99=none
 
472
    Uses cc as CC and CC as CXX
 
473
    Note that SunStudio uses different binaries for C and C++ compilers.
 
474
 
 
475
    Set -m64 (default) or -m32 (if specifically set) in ASFLAGS,
 
476
    LDFLAGS and C/C++ flags.
 
477
 
 
478
    Sets ASFLAGS=LDFLAGS=compiler flags=xarch=sparc, so that we compile
 
479
    Sparc v9 binaries, also -mt is set in all those since we're always
 
480
    building a multithreaded program.
 
481
 
 
482
    C flags   = -xstrconst    This flag is set only on SPARC
422
483
    C++ flags = -noex
423
 
    C/C++ flags = -mt -D_FORTEC -xarch=v9
424
 
 
425
 
    For non-debug builds, the following flags are also used:
426
 
 
427
 
    C/C++ flags = -xO3
 
484
 
 
485
    Set the following C/C++ flags:
 
486
    -fsimple=1
 
487
    -ftrap=%none
 
488
    -nofstore          This flag is set only on x86
 
489
    -xbuiltin=%all
 
490
    -xlibmil
 
491
    -xlibmopt
 
492
 
 
493
    Set the C++ flag:
 
494
    -noex
 
495
    -features=no%except    This flag is set only on x86
 
496
 
 
497
    When compiling with fast we set (-ipo only used if we have
 
498
    set --with-link-time-optimizer):
 
499
    C/C++ flags: -xtarget=native -xunroll=3 -xipo
 
500
    LDFLAGS: -xipo
 
501
 
 
502
    When not compiling with fast we always set -xtarget=generic
 
503
 
 
504
    When compiling with fast on SPARC we also set:
 
505
    C/C++ flags: -xbinopt=prepare
 
506
    LDFLAGS: -xbinopt=prepare
 
507
 
 
508
    When compiling with fast on x86 we also set:
 
509
    C/C++ flags: -xregs=frameptr
 
510
    When not compiling with fast we set on x86
 
511
    C/C++ flags: -xregs=no%frameptr
 
512
 
 
513
    On SPARC we set
 
514
    ASFLAGS = LDFLAGS = C/C++ flags = -xarch=sparc
 
515
 
 
516
    The optimisation level is
 
517
    -xO         Debug builds
 
518
    -xO2        Production build on SPARC
 
519
    -xO3        Production build on x86
 
520
    -xO4        Fast builds on SPARC/x86
428
521
 
429
522
  MacOSX/x86/gcc
430
523
  --------------
431
 
  C/C++ flags include -fno-common -arch i386.
 
524
    C/C++ flags include -fno-common -arch i386.
 
525
    When 64-bits builds then i386 is replaced by x86_64.
432
526
 
433
 
  Non-debug versions also add -Os -felide-constructors, where "-Os"
434
 
  means the build is space-optimised as long as the space optimisations
435
 
  do not negatively affect performance. Debug versions use -O.
 
527
    Non-debug versions also add -Os -felide-constructors, where "-Os"
 
528
    means the build is space-optimised as long as the space optimisations
 
529
    do not negatively affect performance. Debug versions use -O.
 
530
  
 
531
    Mac OS X builds will always be 32-bit by default, when --64 is added
 
532
    the build will be 64 bit instead. Thus the flag --m64 is added only
 
533
    when specifically given as an option.
436
534
EOF
437
535
}
 
536
 
438
537
with_usage()
439
538
{
440
539
  cat <<EOF
495
594
      package="pro"
496
595
      ;;
497
596
    extended )
498
 
      package=""
 
597
      package="extended"
499
598
      ;;
500
599
    cge )
501
600
      package="cge"
537
636
  case "$cpu_type" in
538
637
    x86 )
539
638
      cpu_type="x86"
540
 
      m32="yes"
 
639
      if test "x$m64" = "x" ; then
 
640
        m64="no"
 
641
      fi
541
642
      ;;
542
643
    x86_64 )
543
644
      cpu_type="x86"
544
 
      m64="yes"
 
645
      if test "x$m64" = "x" ; then
 
646
        m64="yes"
 
647
      fi
545
648
      ;;
546
649
    itanium )
547
650
      cpu_type="itanium"
569
672
    icc )
570
673
      compiler="icc"
571
674
      ;;
572
 
    forte )
 
675
    forte | SunStudio | sunstudio )
573
676
      compiler="forte"
574
677
      ;;
575
678
    *)
590
693
    --datadir=*)
591
694
      datadir=`get_key_value "$1"`
592
695
      ;;
 
696
    --with-link-time-optimizer)
 
697
      with_link_time_optimizer="yes"
 
698
      ;;
593
699
    --with-debug=full)
594
700
      full_debug="=full"
595
701
      with_debug_flag="yes"
601
707
        fast_flag="generic"
602
708
      fi
603
709
      ;;
 
710
    --use-comment)
 
711
      without_comment="no"
 
712
      ;;
 
713
    --with-fast-mutexes)
 
714
      with_fast_mutexes="yes"
 
715
      ;;
 
716
    --use-tcmalloc)
 
717
      use_tcmalloc="yes"
 
718
      ;;
604
719
    --with-debug)
605
720
      with_debug_flag="yes"
606
721
      fast_flag="no"
636
751
      warning_mode="normal"
637
752
      ;;
638
753
    --32)
639
 
      if test "x$m64" != "x" ; then
 
754
      if test "x$explicit_size_set" != "x" ; then
640
755
        echo "Cannot set both --32 and --64"
641
756
        exit 1
642
757
      fi
643
 
      m32="yes"
 
758
      explicit_size_set="yes"
 
759
      m64="no"
644
760
      ;;
645
761
    --64)
646
 
      if test "x$m32" != "x" ; then
 
762
      if test "x$explicit_size_set" != "x" ; then
647
763
        echo "Cannot set both --32 and --64"
648
764
        exit 1
649
765
      fi
 
766
      explicit_size_set="yes"
650
767
      m64="yes"
651
768
      ;;
652
769
    --package=*)
750
867
  if test "x$cpu_type" = "x" ; then
751
868
    if test "x$cpu_arg" = "x" ; then
752
869
      usage "CPU type not discovered, cannot proceed"
753
 
      return 1
 
870
      exit 1
754
871
    fi
755
872
    case "$cpu_arg" in
756
873
      core2 | nocona | prescott | pentium* | i*86 )
 
874
        # Intel CPU
757
875
        cpu_base_type="x86"
758
876
        ;;
759
 
      athlon* | opteron* )
 
877
      athlon* | opteron* | k6 | k8 )
 
878
        # AMD CPU
760
879
        cpu_base_type="x86"
761
880
        ;;
762
881
      sparc )
775
894
    check_cpu_cflags=""
776
895
  fi
777
896
  if test "x$os" = "xMacOSX" ; then
778
 
    m64="no"
 
897
    if test "x$m64" = "x" ; then
 
898
      m64="no"
 
899
    fi
779
900
  elif test "x$os" = "xSolaris" ; then
780
 
    m64="yes"
781
 
  elif test "x$m32" = "x" ; then
 
901
    if test "x$m64" = "x" ; then
 
902
      m64="yes"
 
903
    fi
 
904
  elif test "x$m64" = "x" ; then
782
905
    if test "x$cpu_arg" = "xnocona" || test "x$cpu_arg" = "xcore2" || \
783
906
       test "x$cpu_arg" = "xathlon64" || test "x$cpu_arg" = "xopteron" ; then
784
907
      m64="yes"
785
 
    elif test "x$m64" != "xyes" ; then
 
908
    else
786
909
      m64="no"
787
910
    fi
788
 
  else
789
 
    m64="no"
790
911
  fi
791
912
  echo "Discovered CPU of type $cpu_base_type ($cpu_arg) on $os"
792
913
  if test "x$m64" = "xyes" ; then
806
927
  cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
807
928
  configure="./configure $base_configs $with_flags"
808
929
 
809
 
  commands="$commands
810
 
    CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
 
930
  env_flags="CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
811
931
  if test "x$LDFLAGS" != "x" ; then
812
 
    commands="$commands
813
 
      LDFLAGS=\"$LDFLAGS\""
 
932
    env_flags="$env_flags LDFLAGS=\"$LDFLAGS\""
814
933
  fi
815
934
  if test "x$ASFLAGS" != "x" ; then
816
 
    commands="$commands
817
 
      ASFLAGS=\"$ASFLAGS\""
 
935
    env_flags="$env_flags ASFLAGS=\"$ASFLAGS\""
818
936
  fi
819
937
  commands="$commands
820
 
    $configure"
 
938
    $env_flags $configure"
821
939
822
940
 
823
941
#
920
1038
# We do not use ccache when gcov is used. Also only when
921
1039
# gcc is used.
922
1040
#
923
 
set_up_ccache()
 
1041
set_ccache_usage()
924
1042
{
925
1043
  if test "x$compiler" = "xgcc" ; then
926
1044
    if ccache -V > /dev/null 2>&1 && test "$USING_GCOV" != "1"
994
1112
  if test "x$with_debug_flag" = "xyes" ; then
995
1113
    if test "x$developer_flag" = "xyes" ; then
996
1114
      loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
997
 
      loc_debug_flags="$loc_debug_cflags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC"
 
1115
      loc_debug_flags="$loc_debug_flags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC"
998
1116
      compiler_flags="$compiler_flags $loc_debug_flags"
999
1117
    fi
1000
1118
  fi
1024
1142
}
1025
1143
 
1026
1144
#
 
1145
# We compile in SSL support if we can, this isn't possible if CXX
 
1146
# and CC aren't the same and we're not using GCC.
 
1147
 
1148
set_ssl()
 
1149
{
 
1150
  if test "x$compiler" = "xgcc" && \
 
1151
     test "x$CC" = "x$CXX" ; then
 
1152
    base_configs="$base_configs --with-ssl"
 
1153
  fi
 
1154
}
 
1155
 
 
1156
#
1027
1157
# Base options used by all packages
1028
1158
#
1029
1159
# SSL library to use. --with-ssl selects the bundled yaSSL
1048
1178
  base_configs="$base_configs --enable-thread-safe-client"
1049
1179
  base_configs="$base_configs --with-big-tables"
1050
1180
  base_configs="$base_configs --with-extra-charsets=all"
1051
 
  base_configs="$base_configs --with-ssl"
 
1181
  if test "x$with_fast_mutexes" = "xyes" ; then
 
1182
    base_configs="$base_configs --with-fast-mutexes"
 
1183
  fi
1052
1184
  base_configs="$base_configs --with-pic"
1053
1185
  base_configs="$base_configs --with-csv-storage-engine"
 
1186
  base_configs="$base_configs --with-perfschema"
1054
1187
}
1055
1188
 
1056
1189
#
1060
1193
#
1061
1194
set_base_engines()
1062
1195
{
1063
 
  engine_configs="$engine_configs --with-archive-storage-engine"
 
1196
  engine_configs="--with-archive-storage-engine"
1064
1197
  engine_configs="$engine_configs --with-blackhole-storage-engine"
1065
 
  engine_configs="$engine_configs --with-example-storage-engine"
 
1198
  engine_configs="$engine_configs --without-example-storage-engine"
1066
1199
  engine_configs="$engine_configs --with-federated-storage-engine"
1067
1200
  engine_configs="$engine_configs --with-partition"
 
1201
  base_configs="$base_configs $engine_configs"
 
1202
}
 
1203
 
 
1204
set_innodb_engine()
 
1205
{
 
1206
  base_configs="$base_configs --with-innodb"
 
1207
}
 
1208
 
 
1209
set_ndb_engine()
 
1210
{
 
1211
  base_configs="$base_configs --with-ndbcluster"
 
1212
  base_configs="$base_configs --without-ndb-debug"
1068
1213
}
1069
1214
 
1070
1215
set_pro_package()
1071
1216
{
1072
 
  base_configs="$base_configs $engine_configs"
1073
 
  base_configs="$base_configs --with-innodb"
1074
 
  base_configs="$base_configs --with-comment=\"MySQL Pro $version_text built from source\""
 
1217
  if test "x$without_comment" != "xyes" ; then
 
1218
    base_configs="$base_configs --with-comment=\"MySQL Enterprise Pro $version_text built from source\""
 
1219
  fi
1075
1220
  if test "x$with_debug_flag" = "xyes" ; then
1076
1221
    base_configs="$base_configs --with-server-suffix=\"-debug\""
1077
1222
  fi
1079
1224
 
1080
1225
set_cge_extended_package()
1081
1226
{
1082
 
  if test "x$gpl" = "xno" ; then
1083
 
    echo "Cannot build Extended Carrier Grade Edition as Commercial version"
 
1227
  if test "x$without_comment" != "xyes" ; then
 
1228
    base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
1084
1229
  fi
1085
 
  base_configs="$base_configs --with-ndbcluster"
1086
 
  base_configs="$base_configs --without-ndb-debug"
1087
 
  base_configs="$base_configs $engine_configs"
1088
 
  base_configs="$base_configs --with-innodb"
1089
 
  base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
1090
1230
  if test "x$with_debug_flag" = "xyes" ; then
1091
1231
    base_configs="$base_configs --with-server-suffix=\"-cge-extended-debug\""
1092
1232
  else
1093
 
    base_configs="$base_configs --with-server-suffix=\"-cge-extended"\"
 
1233
    base_configs="$base_configs --with-server-suffix=\"-cge-extended\""
1094
1234
  fi
1095
1235
}
1096
1236
 
1097
1237
set_cge_package()
1098
1238
{
1099
 
  base_configs="$base_configs --with-ndbcluster"
1100
 
  base_configs="$base_configs --without-ndb-debug"
1101
 
  base_configs="$base_configs $engine_configs"
1102
 
  base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
 
1239
  if test "x$without_comment" != "xyes" ; then
 
1240
    base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
 
1241
  fi
1103
1242
  if test "x$with_debug_flag" = "xyes" ; then
1104
1243
    base_configs="$base_configs --with-server-suffix=\"-cge-debug\""
1105
1244
  else
1106
 
    base_configs="$base_configs --with-server-suffix=\"-cge"\"
 
1245
    base_configs="$base_configs --with-server-suffix=\"-cge\""
1107
1246
  fi
1108
1247
}
1109
1248
 
1110
1249
set_classic_package()
1111
1250
{
1112
 
  base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
 
1251
  if test "x$without_comment" != "xyes" ; then
 
1252
    base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
 
1253
  fi
1113
1254
  if test "x$with_debug_flag" = "xyes" ; then
1114
1255
    base_configs="$base_configs --with-server-suffix=\"-debug\""
1115
1256
  fi
 
1257
  base_configs="$base_configs --without-example-storage-engine"
1116
1258
}
1117
1259
 
1118
1260
#
1140
1282
  fi
1141
1283
}
1142
1284
 
 
1285
set_cc_and_cxx_for_gcc()
 
1286
{
 
1287
  if test "x$CC" = "x" ; then
 
1288
    CC="gcc -static-libgcc -fno-exceptions"
 
1289
  fi
 
1290
  if test "x$CXX" = "x" ; then
 
1291
    CXX="gcc -static-libgcc -fno-exceptions"
 
1292
  fi
 
1293
}
 
1294
 
 
1295
set_cc_and_cxx_for_icc()
 
1296
{
 
1297
  if test "x$CC" = "x" ; then
 
1298
    CC="icc -static-intel -static-libgcc"
 
1299
  fi
 
1300
  if test "x$CXX" = "x" ; then
 
1301
    CXX="icpc -static-intel -static-libgcc"
 
1302
  fi
 
1303
}
 
1304
 
 
1305
set_cc_and_cxx_for_forte()
 
1306
{
 
1307
  if test "x$CC" = "x" ; then
 
1308
    CC="cc"
 
1309
  fi
 
1310
  if test "x$CXX" = "x" ; then
 
1311
    CXX="CC"
 
1312
  fi
 
1313
}
 
1314
 
1143
1315
#
1144
1316
# If we discover a Core 2 Duo architecture and we have enabled the fast
1145
1317
# flag, we enable a compile especially optimised for Core 2 Duo. This
1167
1339
    exit 1
1168
1340
  fi
1169
1341
  base_configs="$base_configs --enable-assembler"
1170
 
  CC="gcc"
1171
 
  CXX="gcc"
1172
 
}
1173
 
 
 
1342
  if test "x$fast_flag" != "xno" ; then
 
1343
    compiler_flags="$compiler_flags -O3"
 
1344
  else
 
1345
    compiler_flags="$compiler_flags -O0"
 
1346
  fi
 
1347
  set_cc_and_cxx_for_gcc
 
1348
}
 
1349
 
 
1350
check_64_bits()
 
1351
{
 
1352
  echo "Checking for 32/64-bits compilation"
 
1353
  echo "int main() { return 0; }" > temp_test.c
 
1354
  if test "x$m64" = "xyes" ; then
 
1355
    cmd="$CC $compile_flags -m64 temp_test.c"
 
1356
    if ! $cmd 2>1 ; then
 
1357
      m64="no"
 
1358
      echo "Changing to 32-bits since 64-bits didn't work"
 
1359
    else
 
1360
      echo "Will use 64-bits"
 
1361
    fi
 
1362
  else
 
1363
    cmd="$CC $compile_flags -m32 temp_test.c"
 
1364
    if ! $cmd 2>1 ; then
 
1365
      m64="yes"
 
1366
      echo "Changing to 64-bits since 32-bits didn't work"
 
1367
    else
 
1368
      echo "Will use 32-bits"
 
1369
    fi
 
1370
  fi
 
1371
  rm temp_test.c
 
1372
}
 
1373
 
 
1374
#
 
1375
# Get GCC version
 
1376
#
 
1377
get_gcc_version()
 
1378
{
 
1379
  # check if compiler is gcc and dump its version
 
1380
  cc_verno=`$cc -dumpversion 2>/dev/null`
 
1381
  if test "x$?" = "x0" ; then
 
1382
    set -- `echo $cc_verno | tr '.' ' '`
 
1383
    cc_ver="GCC"
 
1384
    cc_major=$1
 
1385
    cc_minor=$2
 
1386
    cc_patch=$3
 
1387
    gcc_version=`expr $cc_major '*' 100 '+' $cc_minor`
 
1388
  fi
 
1389
}
 
1390
 
 
1391
#
 
1392
# Link Time Optimizer in GCC (LTO) uses a parameter -flto
 
1393
# which was added to GCC 4.5, if --with-link-time-optimizer
 
1394
# is set then use this feature
 
1395
#
 
1396
check_for_link_time_optimizer()
 
1397
{
 
1398
  get_gcc_version
 
1399
  if test "$gcc_version" -ge 405 && \
 
1400
     test "x$with_link_time_optimizer" = "xyes" ; then
 
1401
    compiler_flags="$compiler_flags -flto"
 
1402
    LDFLAGS="$LDFLAGS -flto"
 
1403
  fi
 
1404
}
1174
1405
#
1175
1406
# Linux Section
1176
1407
#
1178
1409
{
1179
1410
  if test "x$cpu_base_type" != "xx86" && \
1180
1411
     test "x$cpu_base_type" != "xitanium" ; then
1181
 
    usage "Only x86 and Itanium CPUs supported for 32-bit Linux"
 
1412
    usage "Only x86 and Itanium CPUs supported for Linux"
1182
1413
    exit 1
1183
1414
  fi
1184
 
  base_configs="$base_configs --with-fast-mutexes"
 
1415
  if test "x$use_tcmalloc" = "xyes" ; then
 
1416
    base_configs="$base_configs --with-mysqld-libs=-ltcmalloc_minimal"
 
1417
  fi
1185
1418
  if test "x$cpu_base_type" = "xx86" ; then
1186
1419
    base_configs="$base_configs --enable-assembler"
1187
1420
  fi
1188
1421
  if test "x$compiler" = "xgcc" ; then
1189
 
    CC="gcc"
1190
 
    CXX="gcc"
 
1422
    set_cc_and_cxx_for_gcc
 
1423
    if test "x$fast_flag" != "xno" ; then
 
1424
      if test "x$fast_flag" = "xyes" ; then
 
1425
        compiler_flags="$compiler_flags -O3"
 
1426
        check_for_link_time_optimizer
 
1427
      else
 
1428
        compiler_flags="$compiler_flags -O2"
 
1429
      fi
 
1430
    else
 
1431
      compiler_flags="$compiler_flags -O0"
 
1432
    fi
 
1433
    check_64_bits
1191
1434
    if test "x$m64" = "xyes" ; then
1192
1435
      compiler_flags="$compiler_flags -m64"
 
1436
    else
 
1437
      compiler_flags="$compiler_flags -m32"
1193
1438
    fi
1194
1439
# configure will set proper compiler flags for gcc on Linux
1195
1440
  elif test "x$compiler" = "xicc" ; then
1196
1441
    compiler_flags="$compiler_flags -mp -restrict"
1197
 
    CC="icc -static-intel"
1198
 
    CXX="icpc -static-intel"
 
1442
    set_cc_and_cxx_for_icc
1199
1443
    if test "x$cpu_base_type" = "xitanium" ; then
1200
1444
      compiler_flags="$compiler_flags -no-ftz"
1201
1445
    fi
1202
1446
    if test "x$fast_flag" != "xno" ; then
1203
1447
      compiler_flags="$compiler_flags -O3 -unroll2 -ip"
1204
 
      if test "x$fast_flag" = "xyes" ; then
 
1448
      if test "x$fast_flag" = "xyes" && \
 
1449
         test "x$with_link_time_optimizer" = "xyes" ; then
1205
1450
        compiler_flags="$compiler_flags -ipo"
 
1451
        LDFLAGS="$LDFLAGS -ipo"
1206
1452
      fi
1207
1453
    fi
1208
1454
  else
1216
1462
#
1217
1463
set_solaris_configs()
1218
1464
{
1219
 
  base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
 
1465
# Use mtmalloc as malloc, see Tim Cook blog
 
1466
# For information on optimal compiler settings, see article at
 
1467
# http://developers.sun.com/solaris/articles/mysql_perf_tune.html
 
1468
# by Luojia Chen at Sun.
 
1469
  base_configs="$base_configs --with-named-curses=-lcurses"
1220
1470
  case "`uname -a`" in
1221
 
    *5.10*|*5.11*)
 
1471
    *5.8* | *5.9* )
 
1472
      ;;
 
1473
 
 
1474
    *5.10* | *5.11*)
 
1475
      base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
1222
1476
      ;;
1223
1477
    *)
1224
 
      die "Only versions 10 and 11 supported for Solaris"
 
1478
      usage "Only versions 8,9, 10 and 11 supported for Solaris"
 
1479
      exit 1
1225
1480
  esac
1226
1481
  if test "x$cpu_base_type" != "xx86" && \
1227
1482
     test "x$cpu_base_type" != "xsparc" ; then
1228
1483
    usage "Only x86 and Sparc CPUs supported for Solaris"
1229
1484
    exit 1
1230
1485
  fi
 
1486
  if test "x$compiler" != "xgcc" && \
 
1487
     test "x$compiler" != "xforte" ; then
 
1488
    usage "Only gcc and Forte compilers supported for Solaris"
 
1489
    exit 1
 
1490
  fi
 
1491
  if test "x$m64" = "xyes" ; then
 
1492
    compiler_flags="$compiler_flags -m64"
 
1493
    LDFLAGS="-m64"
 
1494
    ASFLAGS="$ASFLAGS -m64"
 
1495
  else
 
1496
    compiler_flags="$compiler_flags -m32"
 
1497
    LDFLAGS="-m32"
 
1498
    ASFLAGS="$ASFLAGS -m32"
 
1499
  fi
1231
1500
  if test "x$compiler" = "xgcc" ; then
1232
 
    CC="gcc"
1233
 
    CXX="gcc"
 
1501
    set_cc_and_cxx_for_gcc
1234
1502
    if test "x$cpu_base_type" != "xx86" ; then
1235
 
      usage "Only gcc supported for Solaris 10/11 on SPARC"
1236
 
    fi
1237
 
    compiler_flags="$compiler_flags -m64 -DMY_ATOMIC_MODE_RWLOCKS"
1238
 
    LDFLAGS="-m64 -static-libgcc"
1239
 
    if test "x$fast_flag" != "xno" ; then
1240
 
      LDFLAGS="$LDFLAGS -O2"
1241
 
      compiler_flags="$compiler_flags -O2"
1242
 
    else
1243
 
      LDFLAGS="$LDFLAGS -O"
1244
 
      compiler_flags="$compiler_flags -O"
1245
 
    fi
1246
 
  elif test "x$compiler" = "xforte" ; then
 
1503
      usage "gcc currently not supported for Solaris on SPARC"
 
1504
      exit 1
 
1505
    fi
 
1506
    if test "x$fast_flag" = "xyes" ; then
 
1507
      LDFLAGS="$LDFLAGS -O3"
 
1508
      compiler_flags="$compiler_flags -O3"
 
1509
      check_for_link_time_optimizer
 
1510
    else
 
1511
      if test "x$fast_flag" = "xgeneric" ; then
 
1512
        LDFLAGS="$LDFLAGS -O2"
 
1513
        compiler_flags="$compiler_flags -O2"
 
1514
      else
 
1515
        LDFLAGS="$LDFLAGS -O0"
 
1516
        compiler_flags="$compiler_flags -O0"
 
1517
      fi
 
1518
    fi
 
1519
  else
 
1520
#Using Forte compiler (SunStudio)
 
1521
    set_cc_and_cxx_for_forte
 
1522
    compiler_flags="$compiler_flags -mt"
 
1523
    LDFLAGS="$LDFLAGS -mt"
 
1524
    compiler_flags="$compiler_flags -fsimple=1"
 
1525
    compiler_flags="$compiler_flags -ftrap=%none"
 
1526
    compiler_flags="$compiler_flags -xbuiltin=%all"
 
1527
    compiler_flags="$compiler_flags -xlibmil"
 
1528
    compiler_flags="$compiler_flags -xlibmopt"
 
1529
    if test "x$fast_flag" = "xyes" ; then
 
1530
      compiler_flags="$compiler_flags -xtarget=native"
 
1531
      compiler_flags="$compiler_flags -xunroll=3"
 
1532
      if test "x$with_link_time_optimizer" = "xyes" ; then
 
1533
        compiler_flags="$compiler_flags -xipo"
 
1534
        LDFLAGS="$LDFLAGS -xipo"
 
1535
      fi
 
1536
    else
 
1537
      compiler_flags="$compiler_flags -xtarget=generic"
 
1538
    fi
1247
1539
    if test "x$cpu_base_type" = "xx86" ; then
1248
 
      usage "Only gcc supported for Solaris/x86"
1249
 
    fi
1250
 
    if test "x$cpu_base_type" != "xsparc" ; then
1251
 
      usage "Forte compiler supported for Solaris 9/SPARC only"
1252
 
    fi
1253
 
    CC="cc-5.0"
1254
 
    CXX=CC
1255
 
    ASFLAGS="xarch=v9"
1256
 
    LDFLAGS="xarch=v9"
1257
 
    base_cflags="$base_cflags -Xa -xstrconst -xc99=none"
1258
 
    base_cxxflags="$base_cxxflags -noex"
1259
 
    compiler_flags="$compiler_flags -mt -D_FORTEC -xarch=v9"
1260
 
    if test "x$fast_flag" != "xno" ; then
1261
 
      compiler_flags="$compiler_flags -xO3"
1262
 
    fi
1263
 
  else
1264
 
    usage "Only gcc and Forte compilers supported for Solaris"
1265
 
    exit 1
 
1540
      compiler_flags="$compiler_flags -nofstore"
 
1541
      base_cxx_flags="$base_cxx_flags -features=no%except"
 
1542
      if test "x$fast_flag" = "xyes" ; then
 
1543
        compiler_flags="$compiler_flags -xregs=frameptr"
 
1544
        compiler_flags="$compiler_flags -xO4"
 
1545
      else
 
1546
        compiler_flags="$compiler_flags -xregs=no%frameptr"
 
1547
        if test "x$fast_flag" = "xgeneric" ; then
 
1548
          compiler_flags="$compiler_flags -xO2"
 
1549
        else
 
1550
          compiler_flags="$compiler_flags -xO0"
 
1551
        fi
 
1552
      fi
 
1553
    else
 
1554
#Using SPARC cpu with SunStudio (Forte) compiler
 
1555
      ASFLAGS="$ASFLAGS -xarch=sparc"
 
1556
      LDFLAGS="$LDFLAGS -xarch=sparc"
 
1557
      base_cxxflags="$base_cxxflags -noex"
 
1558
      base_cflags="$base_cflags -xstrconst"
 
1559
      compiler_flags="$compiler_flags -xarch=sparc"
 
1560
      if test "x$fast_flag" = "xyes" ; then
 
1561
        compiler_flags="$compiler_flags -xbinopt=prepare"
 
1562
        LDFLAGS="$LDFLAGS -xbinopt=prepare"
 
1563
        compiler_flags="$compiler_flags -xO4"
 
1564
      elif test "x$fast_flag" = "xgeneric" ; then
 
1565
        compiler_flags="$compiler_flags -xO3"
 
1566
      else
 
1567
        compiler_flags="$compiler_flags -xO0"
 
1568
      fi
 
1569
    fi
1266
1570
  fi
1267
1571
}
1268
1572
 
1271
1575
#
1272
1576
set_macosx_configs()
1273
1577
{
1274
 
  base_cxxflags="$base_cxxflags -fno-common"
1275
 
  if test "x$cpu_base_type" = "xx86" && test "x$compiler" = "xgcc" ; then
1276
 
    compiler_flags="$compiler_flags -arch i386"
1277
 
  else
 
1578
  if test "x$cpu_base_type" != "xx86" || test "x$compiler" != "xgcc" ; then
1278
1579
    usage "Only gcc/x86 supported for Mac OS X"
1279
1580
    exit 1
1280
1581
  fi
1282
1583
# Optimize for space as long as it doesn't affect performance, use some
1283
1584
# optimisations also when not in fast mode.
1284
1585
#
 
1586
  base_cxxflags="$base_cxxflags -felide-constructors"
 
1587
  compiler_flags="$compiler_flags -fno-common"
 
1588
  if test "x$m64" = "xyes" ; then
 
1589
    compiler_flags="$compiler_flags -m64"
 
1590
    compiler_flags="$compiler_flags -arch x86_64"
 
1591
  else
 
1592
    compiler_flags="$compiler_flags -m32"
 
1593
    compiler_flags="$compiler_flags -arch i386"
 
1594
  fi
1285
1595
  if test "x$fast_flag" != "xno" ; then
1286
1596
    compiler_flags="$compiler_flags -Os"
1287
 
    base_cxxflags="$base_cxxflags -felide-constructors"
1288
1597
  else
1289
 
    compiler_flags="$compiler_flags -O"
 
1598
    compiler_flags="$compiler_flags -O0"
1290
1599
  fi
1291
 
  CC="gcc"
1292
 
  CXX="gcc"
 
1600
  set_cc_and_cxx_for_gcc
1293
1601
}
1294
1602
 
1295
1603
#
1370
1678
cpu_type=
1371
1679
package=
1372
1680
prefix="/usr/local/mysql"
1373
 
parallelism="4"
 
1681
parallelism="8"
1374
1682
fast_flag="generic"
1375
1683
compiler="gcc"
1376
1684
gpl="yes"
1398
1706
base_configs=
1399
1707
debug_flags=
1400
1708
cxxflags=
1401
 
m32=
1402
1709
m64=
 
1710
explicit_size_set=
1403
1711
datadir=
1404
1712
commands=
1405
1713
use_autotools=
 
1714
engine_configs=
 
1715
ASFLAGS=
 
1716
LDFLAGS=
 
1717
use_tcmalloc=
 
1718
without_comment="yes"
 
1719
with_fast_mutexes=
 
1720
with_link_time_optimizer=
 
1721
gcc_version="0"
1406
1722
 
1407
1723
set_defaults_based_on_environment
1408
1724
 
1419
1735
# This call sets the cpu_arg and check_cpu_args parameters
1420
1736
#
1421
1737
path=`dirname $0`
 
1738
if test "x$compiler" = "xgcc" ; then
 
1739
  compiler=
 
1740
fi
1422
1741
. "$path/check-cpu"
 
1742
if test "x$compiler" = "x" ; then
 
1743
  compiler="gcc"
 
1744
fi
 
1745
check_os
1423
1746
set_cpu_base
1424
1747
if test "x$?" = "x1" ; then
1425
1748
  exit 1
1447
1770
# including all storage engines except InnoDB, and to use GPL libraries.
1448
1771
#
1449
1772
set_base_configs
1450
 
set_base_engines
1451
1773
if test "x$gpl" = "xyes" ; then
1452
1774
  version_text="GPL version"
1453
1775
else
1454
1776
  version_text="Commercial version"
1455
1777
fi
1456
1778
if test "x$package" = "xpro" ; then
 
1779
  set_base_engines
 
1780
  set_innodb_engine
1457
1781
  set_pro_package
1458
1782
elif test "x$package" = "xextended" ; then
 
1783
  set_base_engines
 
1784
  set_ndb_engine
 
1785
  set_innodb_engine
1459
1786
  set_cge_extended_package
1460
1787
elif test "x$package" = "xcge" ; then
 
1788
  set_base_engines
 
1789
  set_ndb_engine
1461
1790
  set_cge_package
1462
1791
elif test "x$package" = "xclassic" ; then
1463
1792
  set_classic_package
1473
1802
# operating systems, and processors.
1474
1803
#
1475
1804
 
1476
 
check_os
1477
1805
if test "x$os" = "xlinux" ; then
1478
1806
  set_linux_configs
1479
1807
elif test "x$os" = "xSolaris" ; then
1485
1813
else
1486
1814
  die "Operating system not supported by this script"
1487
1815
fi
1488
 
 
 
1816
set_ssl
1489
1817
#
1490
1818
# Final step before setting up commands is to set up proper make and
1491
1819
# proper libtoolize versions, and to determine whether to use ccache.
1492
1820
#
1493
1821
set_make_version
1494
 
set_up_ccache
 
1822
set_ccache_usage
1495
1823
 
1496
1824
#
1497
1825
# Set up commands variable from variables prepared for base