|
@@ -52,33 +52,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
|
|
#
|
|
|
# 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 <https://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.
|
|
|
+# 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 6
|
|
|
+#serial 7
|
|
|
|
|
|
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
|
|
|
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
|
|
@@ -113,33 +92,12 @@ done
|
|
|
# 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 <https://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.
|
|
|
+# 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
|
|
|
+#serial 8
|
|
|
|
|
|
AC_DEFUN([AX_APPEND_FLAG],
|
|
|
[dnl
|
|
@@ -190,33 +148,12 @@ AS_VAR_POPDEF([FLAGS])dnl
|
|
|
#
|
|
|
# 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 <https://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.
|
|
|
+# 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 6
|
|
|
+#serial 7
|
|
|
|
|
|
AC_DEFUN([AX_APPEND_LINK_FLAGS],
|
|
|
[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
|
@@ -380,33 +317,12 @@ AC_LANG_POP([Fortran])
|
|
|
# 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 <https://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.
|
|
|
+# 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
|
|
|
+#serial 6
|
|
|
|
|
|
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
|
|
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
|
@@ -468,7 +384,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl
|
|
|
# permitted in any medium without royalty provided the copyright notice
|
|
|
# and this notice are preserved.
|
|
|
|
|
|
-#serial 8
|
|
|
+#serial 9
|
|
|
|
|
|
AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
|
|
|
AC_BEFORE([$0],[AC_PROG_CC])dnl
|
|
@@ -544,8 +460,8 @@ AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
|
|
|
dnl Define various variables if debugging is disabled.
|
|
|
dnl assert.h is a NOP if NDEBUG is defined, so define it by default.
|
|
|
AS_IF([test "x$enable_debug" = "xyes"],
|
|
|
- [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])],
|
|
|
- [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])])
|
|
|
+ [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,[1],[Define if debugging is enabled])])],
|
|
|
+ [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,[1],[Define if debugging is disabled])])])
|
|
|
ax_enable_debug=$enable_debug
|
|
|
])
|
|
|
|
|
@@ -580,33 +496,12 @@ AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
|
|
|
# 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 <https://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.
|
|
|
+# 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
|
|
|
+#serial 6
|
|
|
|
|
|
AC_DEFUN([AX_CHECK_LINK_FLAG],
|
|
|
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
|
@@ -989,7 +884,7 @@ AC_DEFUN([AX_COMPILER_FLAGS],[
|
|
|
# and this notice are preserved. This file is offered as-is, without any
|
|
|
# warranty.
|
|
|
|
|
|
-#serial 16
|
|
|
+#serial 17
|
|
|
|
|
|
AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
|
|
|
AC_REQUIRE([AC_PROG_SED])
|
|
@@ -1035,6 +930,19 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
|
|
|
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
|
|
|
|
|
|
AS_IF([test "$ax_enable_compile_warnings" != "no"],[
|
|
|
+ if test "$ax_compiler_cxx" = "no" ; then
|
|
|
+ # C-only flags. Warn in C++
|
|
|
+ AX_APPEND_COMPILE_FLAGS([ dnl
|
|
|
+ -Wnested-externs dnl
|
|
|
+ -Wmissing-prototypes dnl
|
|
|
+ -Wstrict-prototypes dnl
|
|
|
+ -Wdeclaration-after-statement dnl
|
|
|
+ -Wimplicit-function-declaration dnl
|
|
|
+ -Wold-style-definition dnl
|
|
|
+ -Wjump-misses-init dnl
|
|
|
+ ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
|
|
|
+ fi
|
|
|
+
|
|
|
# "yes" flags
|
|
|
AX_APPEND_COMPILE_FLAGS([ dnl
|
|
|
-Wall dnl
|
|
@@ -1076,18 +984,6 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
|
|
|
$6 dnl
|
|
|
$7 dnl
|
|
|
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
|
|
|
- if test "$ax_compiler_cxx" = "no" ; then
|
|
|
- # C-only flags. Warn in C++
|
|
|
- AX_APPEND_COMPILE_FLAGS([ dnl
|
|
|
- -Wnested-externs dnl
|
|
|
- -Wmissing-prototypes dnl
|
|
|
- -Wstrict-prototypes dnl
|
|
|
- -Wdeclaration-after-statement dnl
|
|
|
- -Wimplicit-function-declaration dnl
|
|
|
- -Wold-style-definition dnl
|
|
|
- -Wjump-misses-init dnl
|
|
|
- ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
|
|
|
- fi
|
|
|
])
|
|
|
AS_IF([test "$ax_enable_compile_warnings" = "error"],[
|
|
|
# "error" flags; -Werror has to be appended unconditionally because
|
|
@@ -1355,19 +1251,19 @@ AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
|
|
|
# modified version of the Autoconf Macro, you may extend this special
|
|
|
# exception to the GPL to apply to your modified version as well.
|
|
|
|
|
|
-#serial 5
|
|
|
+#serial 6
|
|
|
|
|
|
AU_ALIAS([AC_FUNC_MKDIR], [AX_FUNC_MKDIR])
|
|
|
AC_DEFUN([AX_FUNC_MKDIR],
|
|
|
[AC_CHECK_FUNCS([mkdir _mkdir])
|
|
|
AC_CACHE_CHECK([whether mkdir takes one argument],
|
|
|
[ac_cv_mkdir_takes_one_arg],
|
|
|
-[AC_TRY_COMPILE([
|
|
|
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/stat.h>
|
|
|
#if HAVE_UNISTD_H
|
|
|
# include <unistd.h>
|
|
|
#endif
|
|
|
-], [mkdir (".");],
|
|
|
+]], [[mkdir (".");]])],
|
|
|
[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])])
|
|
|
if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
|
|
|
AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
|
|
@@ -1388,7 +1284,7 @@ dnl | may prototype it in dir.h and dirent.h, for instance).
|
|
|
dnl |
|
|
|
dnl |Alexandre:
|
|
|
dnl | Would it be sufficient to check for these headers and #include
|
|
|
-dnl | them in the AC_TRY_COMPILE block? (and is AC_HEADER_DIRENT
|
|
|
+dnl | them in the AC_COMPILE_IFELSE block? (and is AC_HEADER_DIRENT
|
|
|
dnl | suitable for this?)
|
|
|
dnl |
|
|
|
dnl |Thomas:
|