~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/falcon/plug.in

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
      AC_TRY_LINK([
16
16
#include <stdlib.h>
17
17
volatile int target= 0;
18
 
int compare= 1,
 
18
int compare= 1;
19
19
int exchange= 2;
20
20
      ],[
21
21
  char ret;
47
47
MYSQL_PLUGIN_ACTIONS(falcon,[
48
48
  AC_CONFIG_FILES(storage/falcon/TransformLib/Makefile)
49
49
 
 
50
  AC_LANG_PUSH([C++])
 
51
  ac_save_CXXFLAGS="$CXXFLAGS"
 
52
  AC_CACHE_CHECK([compiler flag to enable implicit templates],
 
53
                 falcon_cxx_enable_implicit_templates,[
 
54
    CXXFLAGS="$ac_save_CXXFLAGS -fimplicit-templates"
 
55
    AC_TRY_LINK([],
 
56
      [int i = 0;
 
57
       i++;],
 
58
      falcon_cxx_enable_implicit_templates="-fimplicit-templates",
 
59
      falcon_cxx_enable_implicit_templates=""
 
60
    )
 
61
  ])
 
62
 
 
63
  AC_CACHE_CHECK([compiler flag to enable exceptions],
 
64
                 falcon_cxx_enable_exceptions,[
 
65
    CXXFLAGS="$ac_save_CXXFLAGS -fexceptions -lstdc++"
 
66
    AC_TRY_LINK([],
 
67
      [int i = 0;
 
68
       i++;],
 
69
      falcon_cxx_enable_exceptions="-fexceptions -lstdc++",
 
70
      falcon_cxx_enable_exceptions=""
 
71
    )
 
72
  ])
 
73
 
50
74
  AC_CACHE_CHECK([compiler flag to silence offsetof warnings],
51
75
                 falcon_cxx_no_invalid_offsetof,[
52
 
    AC_LANG_PUSH([C++])
53
 
    ac_save_CXXFLAGS="$CXXFLAGS"
54
 
    CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof"
55
 
    AC_TRY_COMPILE([],
 
76
    CXXFLAGS="$ac_save_CXXFLAGS -Wno-invalid-offsetof"
 
77
    AC_TRY_LINK([],
56
78
      [int i = 0;
57
79
       i++;],
58
80
      falcon_cxx_no_invalid_offsetof="-Wno-invalid-offsetof",
59
81
      falcon_cxx_no_invalid_offsetof=""
60
82
    )
61
 
    CXXFLAGS=$ac_save_CXXFLAGS
62
 
    AC_LANG_POP([C++])
63
83
  ])
64
84
 
 
85
  CXXFLAGS=$ac_save_CXXFLAGS
 
86
  AC_LANG_POP([C++])
 
87
 
65
88
  # Falcon uses exceptions and STL.
66
 
  CXXLDFLAGS="$CXXLDFLAGS -fexceptions -lstdc++"
67
 
  FALCON_CXXFLAGS="$falcon_cxx_no_invalid_offsetof -fexceptions"
 
89
  CXXLDFLAGS="$CXXLDFLAGS $falcon_cxx_enable_exceptions"
 
90
  FALCON_CXXFLAGS="$falcon_cxx_no_invalid_offsetof $falcon_cxx_enable_implicit_templates $falcon_cxx_enable_exceptions"
68
91
  case "$with_debug" in
69
92
    yes)  FALCON_CXXFLAGS="$FALCON_CXXFLAGS -D_DEBUG" ;;
70
93
    full) FALCON_CXXFLAGS="$FALCON_CXXFLAGS -D_DEBUG -DMEM_DEBUG" ;;
71
94
  esac
72
95
 
73
96
  AC_SUBST([FALCON_CXXFLAGS])
 
97
 
 
98
  # When compiling with Sun Studio compiler on SPARC assembly code for
 
99
  # Interlock operations needs to be included. This has been implemented 
 
100
  # as "inline templates" in a separate file
 
101
  FALCON_SPARC_ASSEMBLY=""
 
102
  case $host in
 
103
    sparc-sun-solaris2.9)
 
104
      case $CXX_VERSION in
 
105
        *Sun*C++*)
 
106
          FALCON_SPARC_ASSEMBLY="CompareAndSwapSparc.il"
 
107
          ;;
 
108
      esac
 
109
      ;;
 
110
  esac
 
111
 
 
112
  AC_SUBST([FALCON_SPARC_ASSEMBLY])
74
113
])