diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/maria/libmarias3/m4 | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/libmarias3/m4')
28 files changed, 1938 insertions, 0 deletions
diff --git a/storage/maria/libmarias3/m4/ax_add_am_macro.m4 b/storage/maria/libmarias3/m4/ax_add_am_macro.m4 new file mode 100644 index 00000000..51ce0d0c --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_add_am_macro.m4 @@ -0,0 +1,29 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_add_am_macro.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_ADD_AM_MACRO([RULE]) +# +# DESCRIPTION +# +# Adds the specified rule to $AMINCLUDE. This macro will only work +# properly with implementations of Make which allow include statements. +# See also AX_ADD_AM_MACRO_STATIC. +# +# LICENSE +# +# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AC_DEFUN([AX_ADD_AM_MACRO],[ + AC_REQUIRE([AX_AM_MACROS]) + AX_APPEND_TO_FILE([$AMINCLUDE],[$1]) +]) diff --git a/storage/maria/libmarias3/m4/ax_am_jobserver.m4 b/storage/maria/libmarias3/m4/ax_am_jobserver.m4 new file mode 100644 index 00000000..0bee7ab6 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_am_jobserver.m4 @@ -0,0 +1,55 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_am_jobserver.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_AM_JOBSERVER([default_value]) +# +# DESCRIPTION +# +# Enables the use of make's jobserver for the purpose of parallel building +# by passing the -j option to make. +# +# The option --enable-jobserver is added to configure which can accept a +# yes, no, or an integer. The integer is the number of separate jobs to +# allow. If 'yes' is given, then the is assumed to be one more than the +# number of CPUs (determined through AX_COUNT_CPUS). If the value of no is +# given, then the jobserver is disabled. The default value is given by the +# first argument of the macro, or 'yes' if the argument is omitted. +# +# This macro makes use of AX_AM_MACROS, so you must add the following line +# +# @INC_AMINCLUDE@ +# +# to your Makefile.am files. +# +# LICENSE +# +# Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_AM_JOBSERVER], [ + AC_REQUIRE([AX_COUNT_CPUS]) + AC_REQUIRE([AX_AM_MACROS]) + AC_ARG_ENABLE( jobserver, + [ --enable-jobserver@<:@=no/yes/@%:@@:>@ default=m4_ifval([$1],[$1],[yes]) + Enable up to @%:@ make jobs + yes: enable one more than CPU count + ],, [enable_jobserver=m4_ifval([$1],[$1],[yes])]) + if test "x$enable_jobserver" = "xyes"; then + enable_jobserver=$CPU_COUNT + ((enable_jobserver++)) + fi + m4_pattern_allow(AM_MAKEFLAGS) + if test "x$enable_jobserver" != "xno"; then + AC_MSG_NOTICE([added jobserver support to make for $enable_jobserver jobs]) + AX_ADD_AM_MACRO( AM_MAKEFLAGS += -j$enable_jobserver ) + fi +]) diff --git a/storage/maria/libmarias3/m4/ax_am_macros.m4 b/storage/maria/libmarias3/m4/ax_am_macros.m4 new file mode 100644 index 00000000..6b4bd223 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_am_macros.m4 @@ -0,0 +1,44 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_am_macros.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_AM_MACROS +# +# DESCRIPTION +# +# Adds support for macros that create Make rules. You must manually add +# the following line +# +# @INC_AMINCLUDE@ +# +# to your Makefile.in (or Makefile.am if you use Automake) files. +# +# LICENSE +# +# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AC_DEFUN([AX_AM_MACROS], +[ +AC_MSG_NOTICE([adding automake macro support]) +AMINCLUDE="aminclude.am" +AC_SUBST(AMINCLUDE) +AC_MSG_NOTICE([creating $AMINCLUDE]) +AMINCLUDE_TIME=`date` +AX_PRINT_TO_FILE([$AMINCLUDE],[[ +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on $AMINCLUDE_TIME + +]]) + +INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" +AC_SUBST(INC_AMINCLUDE) +]) diff --git a/storage/maria/libmarias3/m4/ax_append_compile_flags.m4 b/storage/maria/libmarias3/m4/ax_append_compile_flags.m4 new file mode 100644 index 00000000..1f8e7084 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_append_compile_flags.m4 @@ -0,0 +1,65 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the compiler works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. During the check the flag is always added to the +# current language's flags. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and +# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with +# AX_APPEND_LINK_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 3 + +AC_DEFUN([AX_APPEND_COMPILE_FLAGS], +[AC_REQUIRE([AX_CHECK_COMPILE_FLAG]) +AC_REQUIRE([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) +done +])dnl AX_APPEND_COMPILE_FLAGS diff --git a/storage/maria/libmarias3/m4/ax_append_flag.m4 b/storage/maria/libmarias3/m4/ax_append_flag.m4 new file mode 100644 index 00000000..1d38b76f --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_append_flag.m4 @@ -0,0 +1,69 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) +# +# DESCRIPTION +# +# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space +# added in between. +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains +# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly +# FLAG. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_APPEND_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl +AS_VAR_SET_IF(FLAGS, + [case " AS_VAR_GET(FLAGS) " in + *" $1 "*) + AC_RUN_LOG([: FLAGS already contains $1]) + ;; + *) + AC_RUN_LOG([: FLAGS="$FLAGS $1"]) + AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) + ;; + esac], + [AS_VAR_SET(FLAGS,["$1"])]) +AS_VAR_POPDEF([FLAGS])dnl +])dnl AX_APPEND_FLAG diff --git a/storage/maria/libmarias3/m4/ax_append_link_flags.m4 b/storage/maria/libmarias3/m4/ax_append_link_flags.m4 new file mode 100644 index 00000000..48cbd4bb --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_append_link_flags.m4 @@ -0,0 +1,63 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the linker works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is +# used. During the check the flag is always added to the linker's flags. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. +# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 3 + +AC_DEFUN([AX_APPEND_LINK_FLAGS], +[AC_REQUIRE([AX_CHECK_LINK_FLAG]) +AC_REQUIRE([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3]) +done +])dnl AX_APPEND_LINK_FLAGS diff --git a/storage/maria/libmarias3/m4/ax_append_to_file.m4 b/storage/maria/libmarias3/m4/ax_append_to_file.m4 new file mode 100644 index 00000000..f9f54e08 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_append_to_file.m4 @@ -0,0 +1,27 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_to_file.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_TO_FILE([FILE],[DATA]) +# +# DESCRIPTION +# +# Appends the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 8 + +AC_DEFUN([AX_APPEND_TO_FILE],[ +AC_REQUIRE([AX_FILE_ESCAPES]) +printf "$2\n" >> "$1" +]) diff --git a/storage/maria/libmarias3/m4/ax_assert.m4 b/storage/maria/libmarias3/m4/ax_assert.m4 new file mode 100644 index 00000000..88741293 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_assert.m4 @@ -0,0 +1,66 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_ASSERT() +# +# DESCRIPTION +# +# --enable-assert +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 6 + +AC_DEFUN([AX_ASSERT], + [AC_PREREQ([2.63])dnl + AC_REQUIRE([AX_DEBUG]) + AC_REQUIRE([AX_VCS_CHECKOUT]) + AC_ARG_ENABLE([assert], + [AS_HELP_STRING([--enable-assert], + [Enable assert, this will be overridden by --enable-debug (yes|no) @<:@default=no@:>@])], + [ax_enable_assert=yes], + [ax_enable_assert=no]) + + AS_IF([ test "$ax_enable_assert" = "yes" -o "$ax_enable_debug" = "yes" -o "$ac_cv_vcs_checkout" = "yes" ], + [ax_enable_assert="yes"], + [ax_enable_assert="no" + AC_DEFINE(NDEBUG,[1],[Define to 1 to disable assert'ing code.])]) + + AC_MSG_CHECKING([for assert]) + AC_MSG_RESULT([$ax_enable_assert]) + ]) + diff --git a/storage/maria/libmarias3/m4/ax_check_compile_flag.m4 b/storage/maria/libmarias3/m4/ax_check_compile_flag.m4 new file mode 100644 index 00000000..c3a8d695 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_check_compile_flag.m4 @@ -0,0 +1,72 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/storage/maria/libmarias3/m4/ax_check_link_flag.m4 b/storage/maria/libmarias3/m4/ax_check_link_flag.m4 new file mode 100644 index 00000000..e2d0d363 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_check_link_flag.m4 @@ -0,0 +1,71 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the linker or gives an error. +# (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_LINK_FLAG], +[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl +AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $4 $1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + LDFLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_LINK_FLAGS diff --git a/storage/maria/libmarias3/m4/ax_compiler_vendor.m4 b/storage/maria/libmarias3/m4/ax_compiler_vendor.m4 new file mode 100644 index 00000000..c2f421bc --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_compiler_vendor.m4 @@ -0,0 +1,85 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_VENDOR +# +# DESCRIPTION +# +# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun, +# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft, +# watcom, etc. The vendor is returned in the cache variable +# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2008 Matteo Frigo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 12 + +AC_DEFUN([AX_COMPILER_VENDOR], +[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, + [# note: don't check for gcc first since some other compilers define __GNUC__ + vendors="intel: __ICC,__ECC,__INTEL_COMPILER + ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ + pathscale: __PATHCC__,__PATHSCALE__ + clang: __clang__ + fujitsu: __FUJITSU + gnu: __GNUC__ + sun: __SUNPRO_C,__SUNPRO_CC + hp: __HP_cc,__HP_aCC + dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER + borland: __BORLANDC__,__TURBOC__ + comeau: __COMO__ + cray: _CRAYC + kai: __KCC + lcc: __LCC__ + sgi: __sgi,sgi + microsoft: _MSC_VER + metrowerks: __MWERKS__ + watcom: __WATCOMC__ + portland: __PGI + unknown: UNKNOWN" + for ventest in $vendors; do + case $ventest in + *:) vendor=$ventest; continue ;; + *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; + esac + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ + #if !($vencpp) + thisisanerror; + #endif + ])], [break]) + done + ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` + ]) +]) diff --git a/storage/maria/libmarias3/m4/ax_compiler_version.m4 b/storage/maria/libmarias3/m4/ax_compiler_version.m4 new file mode 100644 index 00000000..8304d3db --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_compiler_version.m4 @@ -0,0 +1,100 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_VERSION() +# +# DESCRIPTION +# +# Capture version of C/C++ compiler +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 6 +AC_DEFUN([_C_COMPILER_VERSION], + [AC_MSG_CHECKING([C Compiler version]) + + AS_CASE(["$ax_cv_c_compiler_vendor"], + [sun],[ax_c_compiler_version=`$CC -V 2>&1 | sed 1q`], + [intel],[ax_c_compiler_version=`$CC --version 2>&1 | sed 1q`], + [clang],[ax_c_compiler_version=`$CC --version 2>&1 | sed 1q`], + [gnu],[ax_c_compiler_version=`$CC --version | sed 1q`], + [mingw],[ax_c_compiler_version=`$CC --version | sed 1q`], + [ax_c_compiler_version="unknown: $ax_cv_c_compiler_vendor"]) + + AC_MSG_RESULT(["$ax_c_compiler_version"]) + AC_SUBST([CC_VERSION_VENDOR],["$ax_cv_c_compiler_vendor"]) + AC_SUBST([CC_VERSION],["$ax_c_compiler_version"]) + ]) + +AC_DEFUN([_CXX_COMPILER_VERSION], + [AC_MSG_CHECKING([C++ Compiler version]) + + AS_CASE(["$ax_cv_c_compiler_vendor"], + [sun],[ax_cxx_compiler_version=`$CXX -V 2>&1 | sed 1q`], + [intel],[ax_cxx_compiler_version=`$CXX --version 2>&1 | sed 1q`], + [clang],[ax_cxx_compiler_version=`$CXX --version 2>&1 | sed 1q`], + [gnu],[ax_cxx_compiler_version=`$CXX --version | sed 1q`], + [mingw],[ax_cxx_compiler_version=`$CXX --version | sed 1q`], + [ax_cxx_compiler_version="unknown: $ax_cv_c_compiler_vendor"]) + + AC_MSG_RESULT(["$ax_cxx_compiler_version"]) + AC_SUBST([CXX_VERSION_VENDOR],["$ax_cv_c_compiler_vendor"]) + AC_SUBST([CXX_VERSION],["$ax_cxx_compiler_version"]) + ]) + +AC_DEFUN([AX_COMPILER_VERSION], + [AC_REQUIRE([AX_COMPILER_VENDOR]) + + AC_MSG_CHECKING([MINGW]) + AC_CHECK_DECL([__MINGW64__], + [MINGW=yes + ax_c_compiler_version_vendor=mingw], + [MINGW=no]) + AC_MSG_RESULT([$MINGW]) + + AC_REQUIRE([_C_COMPILER_VERSION]) + AC_REQUIRE([_CXX_COMPILER_VERSION]) + AS_IF([test "x$GCC" = xyes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 7)) +# error GCC is Too Old! +#endif + ]])], + [ac_c_gcc_recent=yes], + [ac_c_gcc_recent=no]) + ]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_count_cpus.m4 b/storage/maria/libmarias3/m4/ax_count_cpus.m4 new file mode 100644 index 00000000..d4f3d290 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_count_cpus.m4 @@ -0,0 +1,57 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COUNT_CPUS +# +# DESCRIPTION +# +# Attempt to count the number of processors present on the machine. If the +# detection fails, then a value of 1 is assumed. +# +# The value is placed in the CPU_COUNT variable. +# +# LICENSE +# +# Copyright (c) 2012 Brian Aker <brian@tangent.org> +# Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net> +# Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + + AC_DEFUN([AX_COUNT_CPUS],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_PROG_EGREP]) + AC_MSG_CHECKING([the number of available CPUs]) + CPU_COUNT="0" + + AS_CASE([$host_os],[ + *darwin*],[ + AS_IF([test -x /usr/sbin/sysctl],[ + sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` + AS_IF([test sysctl_a],[ + CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` + ]) + ])],[ + *linux*],[ + AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ + AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ + CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` + ]) + ]) + ]) + + AS_IF([test "x$CPU_COUNT" = "x0"],[ + CPU_COUNT="1" + AC_MSG_RESULT( [unable to detect (assuming 1)] ) + ],[ + AC_MSG_RESULT( $CPU_COUNT ) + ]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_create_generic_config.m4 b/storage/maria/libmarias3/m4/ax_create_generic_config.m4 new file mode 100644 index 00000000..535838f4 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_create_generic_config.m4 @@ -0,0 +1,195 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_create_generic_config.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CREATE_GENERIC_CONFIG [(PACKAGEnlibs [, VERSION])] +# +# DESCRIPTION +# +# Creates a generic PACKAGE-config file that has all the things that you +# want, hmm, well, atleast it has --cflags, --version, --libs. Ahhm, did +# you see ax_path_generic in the autoconf-archive? ;-) +# +# this macros saves you all the typing for a pkg-config.in script, you +# don't even need to distribute one along. Place this macro in your +# configure.ac, et voila, you got one that you want to install. +# +# oh, btw, if the first arg looks like "mylib -lwhat' then it will go to +# be added to the --libs, and mylib is extracted. +# +# the defaults: $1 = $PACKAGE $LIBS $2 = $VERSION there is also an +# AC_SUBST(GENERIC_CONFIG) that will be set to the name of the file that +# we did output in this macro. Use as: +# +# install-exec-local: install-generic-config +# +# install-generic-config: +# $(mkinstalldirs) $(DESTDIR)$(bindir) +# $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 6 + +AU_ALIAS([AC_CREATE_GENERIC_CONFIG], [AX_CREATE_GENERIC_CONFIG]) +AC_DEFUN([AX_CREATE_GENERIC_CONFIG],[# create a generic PACKAGE-config file +L=`echo ifelse($1, , $PACKAGE $LIBS, $1)` +P=`echo $L | sed -e 's/ -.*//'` +P=`echo $P` +V=`echo ifelse($2, , $VERSION, $2)` +F=`echo $P-config` +L=`echo -l$L | sed -e 's/^-llib/-l/'` +AC_MSG_RESULT(creating $F - generic $V for $L) +test "x$prefix" = xNONE && prefix="$ac_default_prefix" +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +echo '#! /bin/sh' >$F +echo ' ' >>$F +echo 'package="'$P'"' >>$F +echo 'version="'$V'"' >>$F +echo 'libs="'$L'"' >>$F +echo ' ' >>$F +# in the order of occurence a standard automake Makefile +echo 'prefix="'$prefix'"' >>$F +echo 'exec_prefix="'$exec_prefix'"' >>$F +echo 'bindir="'$bindir'"' >>$F +echo 'sbindir="'$sbindir'"' >>$F +echo 'libexecdir="'$libexecdir'"' >>$F +echo 'datadir="'$datadir'"' >>$F +echo 'sysconfdir="'$sysconfdir'"' >>$F +echo 'sharedstatedir="'$sharedstatedir'"' >>$F +echo 'localstatedir="'$localstatedir'"' >>$F +echo 'libdir="'$libdir'"' >>$F +echo 'infodir="'$infodir'"' >>$F +echo 'mandir="'$mandir'"' >>$F +echo 'includedir="'$includedir'"' >>$F +echo 'target="'$target'"' >>$F +echo 'host="'$host'"' >>$F +echo 'build="'$build'"' >>$F +echo ' ' >>$F +echo 'if test "'"\$""#"'" -eq 0; then' >>$F +echo ' cat <<EOF' >>$F +echo 'Usage: $package-config [OPTIONS]' >>$F +echo 'Options:' >>$F +echo ' --prefix[=DIR]) : \$prefix' >>$F +echo ' --package) : \$package' >>$F +echo ' --version) : \$version' >>$F +echo ' --cflags) : -I\$includedir' >>$F +echo ' --libs) : -L\$libdir -l\$package' >>$F +echo ' --help) print all the options (not just these)' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +echo ' ' >>$F +echo 'o=""' >>$F +echo 'h=""' >>$F +echo 'for i in "[$]@"; do' >>$F +echo ' case $i in' >>$F +echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F +echo ' --prefix) o="$o $prefix" ;;' >>$F +echo ' --package) o="$o $package" ;;' >>$F +echo ' --version) o="$o $version" ;;' >>$F +echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F +echo ' then o="$o -I$includedir" ; fi' >>$F +echo ' ;;' >>$F +echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F +echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F +echo ' --bindir) o="$o $bindir" ;;' >>$F +echo ' --sbindir) o="$o $sbindir" ;;' >>$F +echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F +echo ' --datadir) o="$o $datadir" ;;' >>$F +echo ' --datainc) o="$o -I$datadir" ;;' >>$F +echo ' --datalib) o="$o -L$datadir" ;;' >>$F +echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F +echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F +echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F +echo ' --libdir) o="$o $libdir" ;;' >>$F +echo ' --libadd) o="$o -L$libdir" ;;' >>$F +echo ' --infodir) o="$o $infodir" ;;' >>$F +echo ' --mandir) o="$o $mandir" ;;' >>$F +echo ' --target) o="$o $target" ;;' >>$F +echo ' --host) o="$o $host" ;;' >>$F +echo ' --build) o="$o $build" ;;' >>$F +echo ' --data) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F +echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F +echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F +echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F +echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F +echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F +echo ' --help) h="1" ;;' >>$F +echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F +echo ' v=`echo $i | sed -e s://:\$:g`' >>$F +echo ' v=`eval "echo $v"` ' >>$F +echo ' o="$o $v" ;; ' >>$F +echo ' esac' >>$F +echo 'done' >>$F +echo ' ' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'eval "echo $o"' >>$F +echo ' ' >>$F +echo 'if test ! -z "$h" ; then ' >>$F +echo 'cat <<EOF' >>$F +echo ' --prefix=xxx) (what is that for anyway?)' >>$F +echo ' --prefix) \$prefix $prefix' >>$F +echo ' --package) \$package $package' >>$F +echo ' --version) \$version $version' >>$F +echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F +echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F +echo ' --exec_prefix) or... ' >>$F +echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F +echo ' --bindir) \$bindir $bindir' >>$F +echo ' --sbindir) \$sbindir $sbindir' >>$F +echo ' --libexecdir) \$libexecdir $libexecdir' >>$F +echo ' --datadir) \$datadir $datadir' >>$F +echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F +echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F +echo ' --localstatedir) \$localstatedir $localstatedir' >>$F +echo ' --libdir) \$libdir $libdir' >>$F +echo ' --infodir) \$infodir $infodir' >>$F +echo ' --mandir) \$mandir $mandir' >>$F +echo ' --target) \$target $target' >>$F +echo ' --host) \$host $host' >>$F +echo ' --build) \$build $build' >>$F +echo ' --data) -I\$datadir/\$package' >>$F +echo ' --pkgdatadir) \$datadir/\$package' >>$F +echo ' --pkglibdir) \$libdir/\$package' >>$F +echo ' --pkgincludedir) \$includedir/\$package' >>$F +echo ' --help) generated by ax_create_generic_config.m4' >>$F +echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F +echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +GENERIC_CONFIG="$F" +AC_SUBST(GENERIC_CONFIG) +]) diff --git a/storage/maria/libmarias3/m4/ax_debug.m4 b/storage/maria/libmarias3/m4/ax_debug.m4 new file mode 100644 index 00000000..17152e79 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_debug.m4 @@ -0,0 +1,65 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_DEBUG() +# +# DESCRIPTION +# +# --enable-debug +# +# LICENSE +# +# Copyright (C) 2012-2014 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 8 + +AC_DEFUN([AX_DEBUG], + [AC_PREREQ([2.63])dnl + AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])], + [ax_enable_debug=$enableval], + [ax_enable_debug=no]) + + AS_IF([test "x$ax_enable_debug" = xyes], + [AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.]) + AX_ADD_AM_MACRO([AM_YFLAGS += --debug]) + AX_ADD_AM_MACRO([AM_CPPFLAGS += -D_GLIBCXX_DEBUG])], + [AC_SUBST([MCHECK]) + AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])]) + + AC_MSG_CHECKING([for debug]) + AC_MSG_RESULT([$ax_enable_debug]) + AM_CONDITIONAL([DEBUG],[test "x${ax_enable_debug}" = "xyes"])]) diff --git a/storage/maria/libmarias3/m4/ax_endian.m4 b/storage/maria/libmarias3/m4/ax_endian.m4 new file mode 100644 index 00000000..0dfbcd52 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_endian.m4 @@ -0,0 +1,35 @@ +# https://github.com/BrianAker/ddm4 +# =========================================================================== +# +# SYNOPSIS +# +# AX_ENDIAN() +# +# DESCRIPTION +# +# Generate to defines describing endian. +# +# LICENSE +# +# Copyright (c) 2012 Brian Aker <brian@tangent.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + +AC_DEFUN([AX_ENDIAN],[ + AC_C_BIGENDIAN([ + AC_DEFINE([WORDS_BIGENDIAN],[1],[machine is big-endian]) + AC_DEFINE([ENDIAN_BIG],[1],[machine is big-endian]) + AC_DEFINE([ENDIAN_LITTLE],[0],[machine is little-endian])],[ + ],[ + AC_DEFINE([WORDS_BIGENDIAN],[0],[machine is big-endian]) + AC_DEFINE([ENDIAN_BIG],[0],[machine is big-endian]) + AC_DEFINE([ENDIAN_LITTLE],[1],[machine is little-endian]) + ],[ + AC_MSG_ERROR([unable to determine endian]) + ]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_file_escapes.m4 b/storage/maria/libmarias3/m4/ax_file_escapes.m4 new file mode 100644 index 00000000..f4c6a06a --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_file_escapes.m4 @@ -0,0 +1,30 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_file_escapes.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_FILE_ESCAPES +# +# DESCRIPTION +# +# Writes the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_FILE_ESCAPES],[ +AX_DOLLAR="\$" +AX_SRB="\\135" +AX_SLB="\\133" +AX_BS="\\\\" +AX_DQ="\"" +]) diff --git a/storage/maria/libmarias3/m4/ax_harden_compiler_flags.m4 b/storage/maria/libmarias3/m4/ax_harden_compiler_flags.m4 new file mode 100644 index 00000000..63783b4a --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_harden_compiler_flags.m4 @@ -0,0 +1,309 @@ +# vim:expandtab:shiftwidth=2:tabstop=2:smarttab: +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_HARDEN_COMPILER_FLAGS() AX_HARDEN_LINKER_FLAGS() +# +# DESCRIPTION +# +# Any compiler flag that "hardens" or tests code. C99 is assumed. +# +# LICENSE +# +# Copyright (C) 2012-2014 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Notes: +# We do not test for c99 or c++11, that is out of scope. + +# The Following flags are not checked for +# -Wdeclaration-after-statement is counter to C99 +# _APPEND_COMPILE_FLAGS_ERROR([-pedantic]) + +#serial 19 + +AC_DEFUN([_WARNINGS_AS_ERRORS], + [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors], + [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[ac_cv_warnings_as_errors=yes], + [ac_cv_warnings_as_errors=no]) + ]) + ]) + +# Note: Should this be LIBS or LDFLAGS? +AC_DEFUN([_APPEND_LINK_FLAGS_ERROR], + [AX_APPEND_LINK_FLAGS([$1],[LDFLAGS],[-Werror]) + ]) + +AC_DEFUN([_APPEND_COMPILE_FLAGS_ERROR], + [AX_APPEND_COMPILE_FLAGS([$1],,[-Werror]) + ]) + +# Everything above this does the heavy lifting, while what follows does the specifics. + +AC_DEFUN([_HARDEN_LINKER_FLAGS], + [AS_IF([test "$ax_cv_c_compiler_vendor" != "clang"], + [_APPEND_LINK_FLAGS_ERROR([-z relro -z now]) + AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [_APPEND_LINK_FLAGS_ERROR([-rdynamic]) +# AX_APPEND_LINK_FLAGS([--coverage])]) + AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],[AX_APPEND_LINK_FLAGS([-Werror])]) + ]) + ]) + +AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS], + [AC_LANG_PUSH([C])dnl + + AS_IF([test "x$ax_enable_debug" = xyes], + [ + #_APPEND_COMPILE_FLAGS_ERROR([-H]) + _APPEND_COMPILE_FLAGS_ERROR([-g]) + _APPEND_COMPILE_FLAGS_ERROR([-g3]) + _APPEND_COMPILE_FLAGS_ERROR([-fno-eliminate-unused-debug-types]) + _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) + _APPEND_COMPILE_FLAGS_ERROR([-O0]) + ],[ + _APPEND_COMPILE_FLAGS_ERROR([-g]) + _APPEND_COMPILE_FLAGS_ERROR([-O3]) + ]) + + AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) +# _APPEND_COMPILE_FLAGS_ERROR([--coverage]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])], + [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) + + AS_IF([test "$ax_cv_c_compiler_vendor" = "clang"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])]) + + _APPEND_COMPILE_FLAGS_ERROR([-Wall]) + _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) + _APPEND_COMPILE_FLAGS_ERROR([-Weverything]) + _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) +# Anything below this comment please keep sorted. +# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) + _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) + _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs]) + _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) + _APPEND_COMPILE_FLAGS_ERROR([-Wbad-function-cast]) +# Not in use -Wc++-compat + _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts]) + _APPEND_COMPILE_FLAGS_ERROR([-Wcomment]) + _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k]) + _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) + _APPEND_COMPILE_FLAGS_ERROR([-Wdeclaration-after-statement]) + AS_IF([test "x$MINGW" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-Wno-missing-noreturn])], + [_APPEND_COMPILE_FLAGS_ERROR([-Wmissing-noreturn])]) + _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-prototypes]) + _APPEND_COMPILE_FLAGS_ERROR([-Wnested-externs]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-sign]) + AS_IF([test "x$MINGW" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=const]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=noreturn]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=pure]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-redundant-decls])], + [_APPEND_COMPILE_FLAGS_ERROR([-Wredundant-decls])]) + _APPEND_COMPILE_FLAGS_ERROR([-Wshadow]) + _APPEND_COMPILE_FLAGS_ERROR([-Wshorten-64-to-32]) + _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare]) + _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) + _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-prototypes]) + _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) + _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) + + _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs]) + _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-deprecated-declarations]) + _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) + _APPEND_COMPILE_FLAGS_ERROR([-pipe]) + AS_IF([test "x$MINGW" = xyes], + [], + [_APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])]) + _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpacked]) + _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) + _APPEND_COMPILE_FLAGS_ERROR([ftrapv]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-unused-command-line-argument]) +# GCC 4.5 removed this. +# _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code]) + + AS_IF([test "x$ax_enable_debug" = xno], + [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [AS_IF([test "x${host_os}" != "xmingw"], + [AS_IF([test "x$ac_c_gcc_recent" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) + #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) + #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) + _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) + ])])])]) + + AS_IF([test "x$ac_cv_warnings_as_errors" = xyes], + [AX_APPEND_COMPILE_FLAGS([-Werror])]) + + AC_LANG_POP([C]) + ]) + +AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS], + [AC_LANG_PUSH([C++]) + AS_IF([test "x$ax_enable_debug" = xyes], + [CXXFLAGS='' + #_APPEND_COMPILE_FLAGS_ERROR([-H]) + _APPEND_COMPILE_FLAGS_ERROR([-g]) + _APPEND_COMPILE_FLAGS_ERROR([-g3]) + _APPEND_COMPILE_FLAGS_ERROR([-fno-inline]) + _APPEND_COMPILE_FLAGS_ERROR([-fno-eliminate-unused-debug-types]) + _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) + _APPEND_COMPILE_FLAGS_ERRPR([-O0]) + ],[ + _APPEND_COMPILE_FLAGS_ERROR([-g]) + _APPEND_COMPILE_FLAGS_ERROR([-O3]) + ]) + + AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) +# _APPEND_COMPILE_FLAGS_ERROR([--coverage]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])], + [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) + + AS_IF([test "$ax_cv_c_compiler_vendor" = "clang"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])]) + + _APPEND_COMPILE_FLAGS_ERROR([-Wall]) + _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) + _APPEND_COMPILE_FLAGS_ERROR([-Weverything]) + _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) +# Anything below this comment please keep sorted. +# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) + _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs]) + _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) + _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) + _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts]) + _APPEND_COMPILE_FLAGS_ERROR([-Wcomment]) + _APPEND_COMPILE_FLAGS_ERROR([-Wctor-dtor-privacy]) + _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k]) + _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized]) + _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) + _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op]) + _APPEND_COMPILE_FLAGS_ERROR([-Wnon-virtual-dtor]) + _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id]) + _APPEND_COMPILE_FLAGS_ERROR([-Woverloaded-virtual]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith]) + AS_IF([test "x$MINGW" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=const]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-missing-noreturn]) + _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-noreturn]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=noreturn]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-error=suggest-attribute=noreturn]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-redundant-decls])], + [_APPEND_COMPILE_FLAGS_ERROR([-Wredundant-decls])]) + _APPEND_COMPILE_FLAGS_ERROR([-Wshadow]) + _APPEND_COMPILE_FLAGS_ERROR([-Wshorten-64-to-32]) + _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare]) + _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) + _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) + _APPEND_COMPILE_FLAGS_ERROR([-Wtrampolines]) + _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) + _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) + _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) +# _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) +# _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) + _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter]) + _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs]) + _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) + _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) + _APPEND_COMPILE_FLAGS_ERROR([-Wno-deprecated-declarations]) + _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) + _APPEND_COMPILE_FLAGS_ERROR([-pipe]) + AS_IF([test "x$MINGW" = xyes], + [], + [_APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])]) + _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) + _APPEND_COMPILE_FLAGS_ERROR([-Wpacked]) + _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) +# GCC 4.5 removed this. +# _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code]) +# Disable c++11 long long warning for brew openssl on Mac + AS_IF([test "$ax_cv_c_compiler_vendor" = "clang"],[ + _APPEND_COMPILE_FLAGS_ERROR([-Wno-c++11-long-long])]) + AS_IF([test "x$ax_enable_debug" = xno], + [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [AS_IF([test "x${host_os}" != "xmingw"], + [AS_IF([test "x$ac_c_gcc_recent" = xyes], + [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) + #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) + #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) + _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) + ])])])]) + + AS_IF([test "x$ac_cv_warnings_as_errors" = xyes], + [AX_APPEND_COMPILE_FLAGS([-Werror])]) + AC_LANG_POP([C++]) + ]) + +# All of the heavy lifting happens in _HARDEN_LINKER_FLAGS, +# _HARDEN_CC_COMPILER_FLAGS, _HARDEN_CXX_COMPILER_FLAGS + AC_DEFUN([AX_HARDEN_COMPILER_FLAGS], + [AC_PREREQ([2.63])dnl + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AX_COMPILER_VERSION]) + AC_REQUIRE([AX_DEBUG]) + AC_REQUIRE([AX_ASSERT]) + _WARNINGS_AS_ERRORS + + AC_REQUIRE([gl_VISIBILITY]) + AS_IF([test -n "$CFLAG_VISIBILITY"],[CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"]) + + _HARDEN_LINKER_FLAGS + _HARDEN_CC_COMPILER_FLAGS + ]) + diff --git a/storage/maria/libmarias3/m4/ax_hex_version.m4 b/storage/maria/libmarias3/m4/ax_hex_version.m4 new file mode 100644 index 00000000..48d3a737 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_hex_version.m4 @@ -0,0 +1,33 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4 +# =========================================================================== +# +# SYNOPSIS +# +# AX_HEX_VERSION(VARIABLE_NAME, VERSION) +# +# DESCRIPTION +# +# Generate version information in HEX and STRING format. +# +# LICENSE +# +# Copyright (c) 2012 Brian Aker <brian@tangent.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 3 + +AC_DEFUN([AX_HEX_VERSION], + [AC_PREREQ([2.63])dnl + + string_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'` + hex_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` + + AC_SUBST([$1_VERSION_STRING],["$string_version_$1"]) + AC_SUBST([$1_VERSION_HEX],["$hex_version_$1"]) + ]) + diff --git a/storage/maria/libmarias3/m4/ax_platform.m4 b/storage/maria/libmarias3/m4/ax_platform.m4 new file mode 100644 index 00000000..ba46a540 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_platform.m4 @@ -0,0 +1,56 @@ +# =========================================================================== +# http:// +# =========================================================================== +# +# SYNOPSIS +# +# AX_PLATFORM +# +# DESCRIPTION +# +# Provide target and host defines. +# +# LICENSE +# +# Copyright (c) 2012-2013 Brian Aker <brian@tangent.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 +# + AC_DEFUN([AX_PLATFORM], + [AC_REQUIRE([AC_CANONICAL_HOST]) + + AC_DEFINE_UNQUOTED([HOST_VENDOR],["$host_vendor"],[Vendor of Build System]) + AC_DEFINE_UNQUOTED([HOST_OS],["$host_os"], [OS of Build System]) + AC_DEFINE_UNQUOTED([HOST_CPU],["$host_cpu"], [CPU of Build System]) + + AS_CASE([$host_os], + [*mingw*], + [HOST_WINDOWS="true" + AC_DEFINE([HOST_OS_WINDOWS], [1], [Whether we are building for Windows]) + AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) + AH_BOTTOM([ +#ifndef HAVE_SYS_SOCKET_H +# define SHUT_RD SD_RECEIVE +# define SHUT_WR SD_SEND +# define SHUT_RDWR SD_BOTH +#endif + ])], + [*freebsd*],[AC_DEFINE([HOST_OS_FREEBSD],[1],[Whether we are building for FreeBSD]) + AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])], + [*solaris*],[AC_DEFINE([HOST_OS_SOLARIS],[1],[Whether we are building for Solaris])], + [*darwin*], + [HOST_OSX="true"], + [*linux*], + [HOST_LINUX="true" + AC_DEFINE([HOST_OS_LINUX],[1],[Whether we build for Linux])]) + + AM_CONDITIONAL([BUILD_WIN32],[test "x${HOST_WINDOWS}" = "xtrue"]) + AM_CONDITIONAL([HOST_OSX],[test "x${HOST_OSX}" = "xtrue"]) + AM_CONDITIONAL([HOST_LINUX],[test "x${HOST_LINUX}" = "xtrue"]) + AM_CONDITIONAL([HOST_FREEBSD],[test "x${HOST_OS_FREEBSD}" = "xtrue"]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_print_to_file.m4 b/storage/maria/libmarias3/m4/ax_print_to_file.m4 new file mode 100644 index 00000000..5b9d1c39 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_print_to_file.m4 @@ -0,0 +1,27 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_print_to_file.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PRINT_TO_FILE([FILE],[DATA]) +# +# DESCRIPTION +# +# Writes the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_PRINT_TO_FILE],[ +AC_REQUIRE([AX_FILE_ESCAPES]) +printf "$2" > "$1" +]) diff --git a/storage/maria/libmarias3/m4/ax_prog_sphinx_build.m4 b/storage/maria/libmarias3/m4/ax_prog_sphinx_build.m4 new file mode 100644 index 00000000..653c7bce --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_prog_sphinx_build.m4 @@ -0,0 +1,48 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4 +# =========================================================================== +# +# SYNOPSIS +# +# AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND]) +# +# DESCRIPTION +# +# Look for sphinx-build and make sure it is a recent version of it. +# +# LICENSE +# +# Copyright (c) 2012-2013 Brian Aker <brian@tangent.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 5 + +AC_DEFUN([AX_PROG_SPHINX_BUILD], + [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:]) + AS_IF([test x"SPHINXBUILD" = x":"], + [SPHINXBUILD=], + [AS_IF([test -x "$SPHINXBUILD"], + [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent]) + junk=`$SPHINXBUILD --version &> version_file` + AS_IF([test $? -eq 0], + [ax_sphinx_build_version=`head -1 version_file`], + [junk=`$SPHINXBUILD &> version_file` + ax_sphinx_build_version=`head -1 version_file` + rm version_file + AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"]) + $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1 + AS_IF([test $? -eq 0], ,[SPHINXBUILD=]) + rm -rf conftest.d ]) + ]) + rm -f version_file + ]) + + AS_IF([test -n "${SPHINXBUILD}"], + [AC_SUBST([SPHINXBUILD]) + ifelse([$1], , :, [$1])], + [ifelse([$2], , :, [$2])]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_prog_valgrind.m4 b/storage/maria/libmarias3/m4/ax_prog_valgrind.m4 new file mode 100644 index 00000000..af12dc36 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_prog_valgrind.m4 @@ -0,0 +1,44 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4 +# =========================================================================== +# +# SYNOPSIS +# +# AX_PROG_VALGRIND([tool],[options],[ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND]) +# +# DESCRIPTION +# +# Look for valgrind and make sure it is a recent version of it. +# +# LICENSE +# +# Copyright (c) 2012-2013 Brian Aker <brian@tangent.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + +AC_DEFUN([AX_PROG_VALGRIND], + [AX_WITH_PROG([VALGRIND],[valgrind],[:]) + AS_IF([test x"VALGRIND" = x":"], + [VALGRIND=], + [AS_IF([test -x "$VALGRIND"], + [AC_MSG_CHECKING([Checking to see if $VALGRIND is recent]) + junk=`$VALGRIND --version &> version_file` + ax_valgrind_version=`head -1 version_file` + rm version_file + AC_MSG_RESULT([$VALGRIND is version "$ax_valgrind_version"]) + ]) + ]) + + AS_IF([test -n "${VALGRIND}"], + [AC_SUBST([VALGRIND]) + LIBTOOL_COMMAND="\${LIBTOOL} --mode=execute" + AC_SUBST([LIBTOOL_COMMAND]) + AX_ADD_AM_MACRO([[TESTS_ENVIRONMENT=\"\${LIBTOOL_COMMAND} \${VALGRIND} --tool=$1 $2\"]]) + ifelse([$3], , :, [$3])], + [ifelse([$4], , :, [$4])]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_vcs_checkout.m4 b/storage/maria/libmarias3/m4/ax_vcs_checkout.m4 new file mode 100644 index 00000000..8047b65e --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_vcs_checkout.m4 @@ -0,0 +1,75 @@ +# =========================================================================== +# http:// +# =========================================================================== +# +# SYNOPSIS +# +# AX_VCS_CHECKOUT +# +# DESCRIPTION +# +# Discover whether or not we are operating with a tree which +# has been checked out of a version control system. +# +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 6 + +AC_DEFUN([AX_VCS_SYSTEM], + [AC_PREREQ([2.63])dnl + AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system], + [ac_cv_vcs_system="none" + AS_IF([test -d ".bzr"],[ac_cv_vcs_system="bazaar"]) + AS_IF([test -d ".svn"],[ac_cv_vcs_system="svn"]) + AS_IF([test -d ".hg"],[ac_cv_vcs_system="mercurial"]) + AS_IF([test -d ".git"],[ac_cv_vcs_system="git"]) + ]) + AC_DEFINE_UNQUOTED([VCS_SYSTEM],["$ac_cv_vcs_system"],[VCS system]) + ]) + +AC_DEFUN([AX_VCS_CHECKOUT], + [AC_PREREQ([2.63])dnl + AC_REQUIRE([AX_VCS_SYSTEM]) + AC_CACHE_CHECK([for vcs checkout],[ac_cv_vcs_checkout], + [AS_IF([test "x$ac_cv_vcs_system" != "xnone"], + [ac_cv_vcs_checkout=yes], + [ac_cv_vcs_checkout=no]) + ]) + + AM_CONDITIONAL([IS_VCS_CHECKOUT],[test "x$ac_cv_vcs_checkout" = "xyes"]) + AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"], + [AC_DEFINE([VCS_CHECKOUT],[1],[Define if the code was built from VCS.])], + [AC_DEFINE([VCS_CHECKOUT],[0],[Define if the code was built from VCS.])]) + ]) diff --git a/storage/maria/libmarias3/m4/ax_with_prog.m4 b/storage/maria/libmarias3/m4/ax_with_prog.m4 new file mode 100644 index 00000000..f337c059 --- /dev/null +++ b/storage/maria/libmarias3/m4/ax_with_prog.m4 @@ -0,0 +1,70 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_with_prog.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH]) +# +# DESCRIPTION +# +# Locates an installed program binary, placing the result in the precious +# variable VARIABLE. Accepts a present VARIABLE, then --with-program, and +# failing that searches for program in the given path (which defaults to +# the system path). If program is found, VARIABLE is set to the full path +# of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND +# if provided, unchanged otherwise. +# +# A typical example could be the following one: +# +# AX_WITH_PROG(PERL,perl) +# +# NOTE: This macro is based upon the original AX_WITH_PYTHON macro from +# Dustin J. Mitchell <dustin@cs.uchicago.edu>. +# +# LICENSE +# +# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net> +# Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 16 + +AC_DEFUN([AX_WITH_PROG],[ + AC_PREREQ([2.61]) + + pushdef([VARIABLE],$1) + pushdef([EXECUTABLE],$2) + pushdef([VALUE_IF_NOT_FOUND],$3) + pushdef([PATH_PROG],$4) + + AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable) + + AS_IF(test -z "$VARIABLE",[ + AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided) + AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[PATH]]]],absolute path to EXECUTABLE executable), [ + AS_IF([test "$withval" != yes && test "$withval" != no],[ + VARIABLE="$withval" + AC_MSG_RESULT($VARIABLE) + ],[ + VARIABLE="" + AC_MSG_RESULT([no]) + AS_IF([test "$withval" != no], [ + AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[]) + ]) + ]) + ],[ + AC_MSG_RESULT([no]) + AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[]) + ]) + ]) + + popdef([PATH_PROG]) + popdef([VALUE_IF_NOT_FOUND]) + popdef([EXECUTABLE]) + popdef([VARIABLE]) +]) diff --git a/storage/maria/libmarias3/m4/config_extra.m4 b/storage/maria/libmarias3/m4/config_extra.m4 new file mode 100644 index 00000000..6ac9773c --- /dev/null +++ b/storage/maria/libmarias3/m4/config_extra.m4 @@ -0,0 +1,61 @@ +# SYNOPSIS +# +# CONFIG_EXTRA +# +# DESCRIPTION +# +# Adds required extras to config.h +# +# LICENSE +# +# Copyright (C) 2014 Andrew Hutchings +# Based on bottom.m4 from libdrizzle +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 1 + +AC_DEFUN([CONFIG_EXTRA], [ + +AH_TOP([ +#pragma once + +/* Define to make inttypes.h work on some platforms */ +#define __STDC_FORMAT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 + +/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */ +#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H) +# error "You should include config.h as your first include file" +#endif + +]) +])dnl CONFIG_EXTRA diff --git a/storage/maria/libmarias3/m4/include.am b/storage/maria/libmarias3/m4/include.am new file mode 100644 index 00000000..f64a1cc4 --- /dev/null +++ b/storage/maria/libmarias3/m4/include.am @@ -0,0 +1,10 @@ +# vim:ft=automake +# Copyright (C) 2012 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + diff --git a/storage/maria/libmarias3/m4/visibility.m4 b/storage/maria/libmarias3/m4/visibility.m4 new file mode 100644 index 00000000..75c34b6e --- /dev/null +++ b/storage/maria/libmarias3/m4/visibility.m4 @@ -0,0 +1,77 @@ +# visibility.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl MacOS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_MSG_CHECKING([whether the -Werror option is usable]) + AC_CACHE_VAL([gl_cv_cc_vis_werror], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_vis_werror]) + dnl Now check whether visibility declarations are supported. + AC_MSG_CHECKING([for simple visibility declarations]) + AC_CACHE_VAL([gl_cv_cc_visibility], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_visibility]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) |