summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-05-15 10:44:55 +0200
committerSergei Golubchik <sergii@pisem.net>2010-05-15 10:44:55 +0200
commit5eae48c9053d91ee2001dd94a57706cdf50e5707 (patch)
tree0e5e758858e019d6d87faf8bab537980ec9b39d5 /storage/oqgraph
parent3b98d69d689efcaba97476f34537fde24cfd5451 (diff)
downloadmariadb-git-5eae48c9053d91ee2001dd94a57706cdf50e5707.tar.gz
oqgraph fix: not all gcc versions support -fvisibility-inlines-hidden
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/Makefile.am2
-rw-r--r--storage/oqgraph/plug.in16
2 files changed, 18 insertions, 0 deletions
diff --git a/storage/oqgraph/Makefile.am b/storage/oqgraph/Makefile.am
index 3050313e985..56eea4cb87a 100644
--- a/storage/oqgraph/Makefile.am
+++ b/storage/oqgraph/Makefile.am
@@ -40,7 +40,9 @@ BOOST_CXXFLAGS = -frtti -fexceptions -fimplicit-templates
# (automatically gets enabled anyway by -O* on some architectures)
BOOST_CXXFLAGS+= -O3 -fstrict-aliasing
BOOST_CXXFLAGS+= -falign-loops
+if HAVE_FVISIBILITY_INLINES_HIDDEN
BOOST_CXXFLAGS+= -fvisibility-inlines-hidden
+endif
BOOST_CXXFLAGS+= -funroll-loops -fno-trapping-math
EXTRA_DIST = ha_oqgraph.h ha_oqgraph.cc graphcore.cc \
diff --git a/storage/oqgraph/plug.in b/storage/oqgraph/plug.in
index 0cbbad9b381..6331dade3dd 100644
--- a/storage/oqgraph/plug.in
+++ b/storage/oqgraph/plug.in
@@ -2,9 +2,25 @@ MYSQL_STORAGE_ENGINE(oqgraph,,[Graph Storage Engine],
[Open Query Graph Computation Engine], [])
MYSQL_PLUGIN_DYNAMIC(oqgraph, [oqgraph_engine.la])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(oqgraph, [ha_oqgraph.cc])
+MYSQL_PLUGIN_ACTIONS(oqgraph,[
+ AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([whether compiler supports -fvisibility-inlines-hidden])
+ OLD_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ AC_TRY_COMPILE([],[],[
+ AM_CONDITIONAL(HAVE_FVISIBILITY_INLINES_HIDDEN, true)
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ CXXFLAGS=$OLD_CXXFLAGS
+ AC_LANG_POP()
+])
+
AM_CONDITIONAL([BUILD_OQGRAPH_FOR_MYSQL], true)
AM_CONDITIONAL([BUILD_OQGRAPH_STANDALONE], false)
AM_CONDITIONAL([HAVE_DTRACE], false)
+AM_CONDITIONAL(HAVE_FVISIBILITY_INLINES_HIDDEN, false)
AC_LANG_PUSH([C++])