~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120222223355-or06x1euyk8n0ldi
Tags: 5.1.61-0ubuntu0.10.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496
* Dropped patches unnecessary with 5.1.61:
  - debian/patches/90_mysql_safer_strmov.dpatch
  - debian/patches/51_ssl_test_certs.dpatch
  - debian/patches/52_CVE-2009-4030.dpatch
  - debian/patches/53_CVE-2009-4484.dpatch
  - debian/patches/54_CVE-2008-7247.dpatch
  - debian/patches/55_CVE-2010-1621.dpatch
  - debian/patches/56_CVE-2010-1850.dpatch
  - debian/patches/57_CVE-2010-1849.dpatch
  - debian/patches/58_CVE-2010-1848.dpatch
  - debian/patches/59_CVE-2010-1626.dpatch
  - debian/patches/60_CVE-2010-2008.dpatch
  - debian/patches/60_CVE-2010-3677.dpatch
  - debian/patches/60_CVE-2010-3678.dpatch
  - debian/patches/60_CVE-2010-3679.dpatch
  - debian/patches/60_CVE-2010-3680.dpatch
  - debian/patches/60_CVE-2010-3681.dpatch
  - debian/patches/60_CVE-2010-3682.dpatch
  - debian/patches/60_CVE-2010-3683.dpatch
  - debian/patches/60_CVE-2010-3833.dpatch
  - debian/patches/60_CVE-2010-3834.dpatch
  - debian/patches/60_CVE-2010-3835.dpatch
  - debian/patches/60_CVE-2010-3836.dpatch
  - debian/patches/60_CVE-2010-3837.dpatch
  - debian/patches/60_CVE-2010-3838.dpatch
  - debian/patches/60_CVE-2010-3839.dpatch
  - debian/patches/60_CVE-2010-3840.dpatch
  - debian/patches/61_disable_longfilename_test.dpatch
  - debian/patches/62_alter_table_fix.dpatch
  - debian/patches/63_cherrypick-upstream-49479.dpatch
  - debian/patches/10_readline_build_fix.dpatch
* debian/mysql-client-5.1.docs: removed EXCEPTIONS-CLIENT file
* debian/mysql-server-5.1.docs,debian/libmysqlclient16.docs,
  debian/libmysqlclient-dev.docs: removed, no longer necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl -*- ksh -*-
2
2
dnl Process this file with autoconf to produce a configure script.
3
3
 
4
 
AC_PREREQ(2.52)dnl              Minimum Autoconf version required.
5
 
 
6
 
AC_INIT(sql/mysqld.cc)
 
4
# Minimum Autoconf version required.
 
5
AC_PREREQ(2.59)
 
6
 
 
7
dnl Various people throughout the community may parse configure.in to
 
8
dnl get the MySQL version from the source branch.  If the formatting
 
9
dnl of this line is going to be changed, please announce the change to
 
10
dnl internals@lists.mysql.com in advance of pushing the change.
 
11
dnl
 
12
dnl When changing the major version number please also check the switch
 
13
dnl statement in mysqlbinlog::check_master_version().  You may also need
 
14
dnl to update version.c in ndb.
 
15
AC_INIT([MySQL Server], [5.1.61], [], [mysql])
 
16
 
 
17
AC_CONFIG_SRCDIR([sql/mysqld.cc])
7
18
AC_CANONICAL_SYSTEM
8
 
# The Docs Makefile.am parses this line!
9
 
# remember to also update version.c in ndb
10
 
#
11
 
# When changing major version number please also check switch statement
12
 
# in mysqlbinlog::check_master_version().
13
 
AM_INIT_AUTOMAKE(mysql, 5.1.41)
14
 
AM_CONFIG_HEADER([include/config.h:config.h.in])
 
19
# USTAR format gives us the possibility to store longer path names in
 
20
# TAR files, the path name is split into two parts, a 155 chacater
 
21
# first part and a 100 character second part.
 
22
AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
23
AC_PROG_LIBTOOL
 
24
 
 
25
AM_CONFIG_HEADER([include/config.h])
 
26
 
 
27
# Request support for automake silent-rules if available.
 
28
# Default to verbose output. One can use the configure-time
 
29
# option --enable-silent-rules or make V=0 to activate
 
30
# silent rules.
 
31
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
15
32
 
16
33
PROTOCOL_VERSION=10
17
34
DOT_FRM_VERSION=6
25
42
# Remember that regexps needs to quote [ and ] since this is run through m4
26
43
# We take some made up examples
27
44
#
28
 
#  VERSION                  5.1.40sp1-alpha     5.0.34a
29
 
#  MYSQL_NO_DASH_VERSION    5.1.40sp1           5.0.34a
30
 
#  MYSQL_NUMERIC_VERSION    5.1.40              5.0.34
31
 
#  MYSQL_BASE_VERSION       5.1                 5.0
32
 
#  MYSQL_VERSION_ID         50140               50034
 
45
#  VERSION                  5.1.40sp1-alpha     5.0.34a  5.5.1-m2
 
46
#  MYSQL_U_SCORE_VERSION    5.1.40sp1_alpha     5.0.34a  5.5.1_m2
 
47
#  MYSQL_NO_DASH_VERSION    5.1.40sp1           5.0.34a  5.5.1
 
48
#  MYSQL_NUMERIC_VERSION    5.1.40              5.0.34   5.5.1
 
49
#  MYSQL_BASE_VERSION       5.1                 5.0      5.5
 
50
#  MYSQL_VERSION_ID         50140               50034    50501
33
51
#
 
52
MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"`
34
53
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
35
54
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
36
55
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
46
65
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
47
66
 
48
67
dnl Include m4 
 
68
sinclude(config/ac-macros/maintainer.m4)
49
69
sinclude(config/ac-macros/alloca.m4)
50
70
sinclude(config/ac-macros/check_cpu.m4)
51
71
sinclude(config/ac-macros/character_sets.m4)
67
87
#####
68
88
#####
69
89
 
 
90
AC_SUBST(MYSQL_U_SCORE_VERSION)
70
91
AC_SUBST(MYSQL_NO_DASH_VERSION)
71
92
AC_SUBST(MYSQL_BASE_VERSION)
72
93
AC_SUBST(MYSQL_VERSION_ID)
82
103
AC_SUBST(SHARED_LIB_VERSION)
83
104
AC_SUBST(AVAILABLE_LANGUAGES)
84
105
 
 
106
# Check whether a debug mode should be enabled.
 
107
AC_ARG_WITH([debug],
 
108
    AS_HELP_STRING([--with-debug@<:@=full@:>@],
 
109
      [Enable various amounts of debugging support (full adds a slow memory checker).]),
 
110
    [with_debug=$withval],
 
111
    [with_debug=no])
 
112
 
 
113
# Whether the maintainer mode should be enabled.
 
114
MY_MAINTAINER_MODE
85
115
 
86
116
# Canonicalize the configuration name.
87
117
 
255
285
AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf)
256
286
AC_CHECK_PROG(DVIS,      tex,    manual.dvi)
257
287
 
258
 
#check the return type of sprintf
259
 
AC_MSG_CHECKING("return type of sprintf")
260
 
AC_TRY_RUN([
261
 
  int main()
262
 
    {
263
 
      char* s = "hello";
264
 
      char buf[6];
265
 
      if((int)sprintf(buf, s) == strlen(s))
266
 
        return 0;
267
 
      
268
 
      return -1;
269
 
     }
270
 
   ],
271
 
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
272
 
   AC_MSG_RESULT("int")],
273
 
   [AC_TRY_RUN([
274
 
 int main()
275
 
   {
276
 
     char* s = "hello";
277
 
     char buf[6];
278
 
     if((char*)sprintf(buf,s) == buf + strlen(s))
279
 
       return 0;
280
 
     return -1;
281
 
   }           ],
282
 
               [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
283
 
                AC_MSG_RESULT("ptr")],
284
 
               [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
285
 
                AC_MSG_RESULT("garbage")]
286
 
   )],
287
 
   # Cross compile, assume POSIX
288
 
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
289
 
    AC_MSG_RESULT("int (we assume)")]
290
 
)
291
 
 
292
288
AC_PATH_PROG(uname_prog, uname, no)
293
289
 
294
290
# We should go through this and put all the explictly system dependent
818
814
AC_HEADER_DIRENT
819
815
AC_HEADER_STDC
820
816
AC_HEADER_SYS_WAIT
821
 
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
822
 
 memory.h pwd.h select.h \
 
817
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h \
 
818
 ieeefp.h limits.h memory.h pwd.h select.h \
823
819
 stdlib.h stddef.h \
824
820
 strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
825
821
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
914
910
])
915
911
AC_SUBST(WRAPLIBS)
916
912
 
917
 
if test "$TARGET_LINUX" = "true"; then
918
 
  AC_ARG_WITH(pstack,
919
 
    [  --with-pstack           Use the pstack backtrace library],
920
 
    [ USE_PSTACK=$withval ],
921
 
    [ USE_PSTACK=no ])
922
 
  pstack_libs=
923
 
  pstack_dir=
924
 
  if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386"
925
 
  then
926
 
    have_libiberty= have_libbfd=
927
 
    my_save_LIBS="$LIBS"
928
 
dnl I have no idea if this is a good test - can not find docs for libiberty  
929
 
    AC_CHECK_LIB([iberty], [fdmatch],
930
 
      [have_libiberty=yes
931
 
       AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
932
 
    LIBS="$my_save_LIBS"
933
 
 
934
 
    if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
935
 
    then
936
 
      pstack_dir="pstack"
937
 
      pstack_libs="../pstack/libpstack.a -lbfd -liberty"
938
 
      # We must link staticly when using pstack
939
 
      with_mysqld_ldflags="-all-static"
940
 
      AC_SUBST([pstack_dir])
941
 
      AC_SUBST([pstack_libs])
942
 
      AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library])
943
 
dnl This check isn't needed, but might be nice to give some feedback....
944
 
dnl    AC_CHECK_HEADER(libiberty.h,
945
 
dnl      have_libiberty_h=yes,
946
 
dnl      have_libiberty_h=no)
947
 
    else
948
 
      USE_PSTACK="no"
949
 
    fi
950
 
  else
951
 
    USE_PSTACK="no"
952
 
  fi
953
 
fi
954
 
AC_MSG_CHECKING([if we should use pstack])
955
 
AC_MSG_RESULT([$USE_PSTACK])
956
 
 
957
913
# Check for gtty if termio.h doesn't exists
958
914
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
959
915
then
1182
1138
        sql/Makefile.in)
1183
1139
          # Use gen_lex_hash.linux instead of gen_lex_hash
1184
1140
          # Add library dependencies to mysqld_DEPENDENCIES
1185
 
          lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
 
1141
          lib_DEPENDENCIES="\$(openssl_libs) \$(yassl_libs)"
1186
1142
          cat > $filesed << EOF
1187
1143
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
1188
1144
s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
1685
1641
  DEBUG_OPTIMIZE_CXX=""
1686
1642
fi
1687
1643
 
1688
 
AC_ARG_WITH(debug,
1689
 
    [  --with-debug            Add debug code
1690
 
  --with-debug=full       Add debug code (adds memory checker, very slow)],
1691
 
    [with_debug=$withval],
1692
 
    [with_debug=no])
1693
1644
if test "$with_debug" = "yes"
1694
1645
then
1695
1646
  # Medium debug.
1709
1660
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
1710
1661
fi
1711
1662
 
 
1663
AC_ARG_WITH([valgrind],
 
1664
  [AS_HELP_STRING([--with-valgrind],
 
1665
    [Valgrind instrumentation @<:@default=no@:>@])],
 
1666
    [], [with_valgrind=no])
 
1667
 
 
1668
if test "$with_valgrind" != "no"
 
1669
then
 
1670
  AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
 
1671
    [AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
 
1672
fi
 
1673
 
1712
1674
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
1713
1675
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
1714
1676
AC_ARG_ENABLE(debug_sync,
1922
1884
 
1923
1885
MYSQL_CHECK_TIME_T
1924
1886
 
 
1887
dnl
 
1888
dnl check size of time_t
 
1889
dnl
 
1890
 
 
1891
AC_CHECK_SIZEOF(time_t, 8)
 
1892
if test "$ac_cv_sizeof_time_t" -eq 0
 
1893
then
 
1894
  AC_MSG_ERROR("MySQL needs a time_t type.")
 
1895
fi
1925
1896
 
1926
1897
# do we need #pragma interface/#pragma implementation ?
1927
1898
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
1992
1963
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
1993
1964
 
1994
1965
AC_CHECK_FUNCS(strlcat strlcpy)
1995
 
AC_CHECK_FUNCS(issetugid)
 
1966
AC_CHECK_FUNCS(issetugid getuid geteuid getgid getegid)
1996
1967
AC_CHECK_FUNCS(fgetln)
1997
1968
AC_CHECK_FUNCS(getline flockfile)
1998
1969
 
2071
2042
AC_FUNC_UTIME_NULL
2072
2043
AC_FUNC_VPRINTF
2073
2044
 
2074
 
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
 
2045
AC_CHECK_DECLS([fdatasync, bzero])
 
2046
 
 
2047
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
2075
2048
  chsize cuserid fchmod fcntl \
2076
2049
  fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
2077
2050
  getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
2088
2061
  sighold sigset sigthreadmask port_create sleep \
2089
2062
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
2090
2063
  strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
2091
 
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
 
2064
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack \
 
2065
  fedisableexcept)
2092
2066
 
2093
2067
#
2094
2068
#
2691
2665
    fi
2692
2666
 
2693
2667
    # if there is no readline, but we want to build with readline, we fail
2694
 
    if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"]
 
2668
    if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
2695
2669
    then
2696
2670
        AC_MSG_ERROR([This commercially licensed MySQL source package can't
2697
2671
              be built with libreadline. Please use --with-libedit to use
2737
2711
    MAN_DROP="$MAN_DROP embedded"
2738
2712
    grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
2739
2713
  fi
2740
 
  if test X"$with_plugin_innobase" != Xyes
 
2714
  if test X"$with_plugin_innobase" != Xyes -a X"$with_plugin_innodb_plugin" != Xyes
2741
2715
  then
2742
2716
    MAN_DROP="$MAN_DROP innodb"
2743
2717
    grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
2816
2790
fi
2817
2791
 
2818
2792
# "innochecksum" is not in the "innobase/" subdirectory, but should be switched
2819
 
AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes])
 
2793
AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes -o X"$with_plugin_innodb_plugin" = Xyes ])
2820
2794
 
2821
2795
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
2822
2796
# I know to add the static NSS magic if we have static NSS libraries with
2849
2823
done
2850
2824
AC_SUBST(sql_union_dirs)
2851
2825
 
 
2826
#
 
2827
# Setup maintainer mode options by the end to not disturb
 
2828
# system and other checks.
 
2829
#
 
2830
MY_MAINTAINER_MODE_SETUP
 
2831
 
2852
2832
# Some usefull subst
2853
2833
AC_SUBST(CC)
2854
2834
AC_SUBST(GXX)
2865
2845
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
2866
2846
 
2867
2847
# Output results
2868
 
if test -d "$srcdir/pstack" ; then
2869
 
  AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile)
2870
 
fi
2871
2848
if test -d "$srcdir/cmd-line-utils/readline" ; then
2872
2849
  AC_CONFIG_FILES(cmd-line-utils/readline/Makefile)
2873
2850
fi
2874
2851
 
2875
2852
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
2876
2853
 unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl
2877
 
 unittest/mysys/Makefile unittest/examples/Makefile dnl
 
2854
 unittest/mysys/Makefile unittest/strings/Makefile dnl
 
2855
 unittest/examples/Makefile dnl
2878
2856
 strings/Makefile regex/Makefile storage/Makefile dnl
2879
2857
 man/Makefile BUILD/Makefile vio/Makefile dnl
2880
2858
 libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
2897
2875
 
2898
2876
AC_OUTPUT
2899
2877
 
2900
 
echo
2901
 
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
2902
 
echo "latest release, upcoming features, and other information to make your"
2903
 
echo "work or play with MySQL more productive. There you can also find"
2904
 
echo "information about mailing lists for MySQL discussion."
2905
 
echo
2906
 
echo "Remember to check the platform specific part of the reference manual for"
2907
 
echo "hints about installing MySQL on your platform. Also have a look at the"
2908
 
echo "files in the Docs directory."
2909
 
echo
2910
 
# The following text is checked in ./Do-compile to verify that configure
 
2878
# Add warning if user configures with --with-ndbcluster
 
2879
if test X"$with_plugin_ndbcluster" = Xyes ; then
 
2880
  echo 
 
2881
  echo This version of MySQL Cluster is no longer maintained.
 
2882
  echo Please use the separate sources provided for MySQL Cluster instead.
 
2883
  echo See http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster.html
 
2884
  echo for more details.
 
2885
fi
 
2886
 
 
2887
# The first line "Thank you ..." is checked in ./Do-compile to verify that configure
2911
2888
# ended sucessfully - don't remove it.
 
2889
echo
2912
2890
echo "Thank you for choosing MySQL!"
2913
2891
echo
 
2892
echo "Remember to check the platform specific part of the reference manual"
 
2893
echo "for hints about installing MySQL on your platform."
 
2894
echo "Also have a look at the files in the Docs directory."
 
2895
echo