summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-10-05 00:45:00 +0200
committerBruno Haible <bruno@clisp.org>2020-10-05 00:45:25 +0200
commit8cb07d4235760c949123863c8b22597a06d0dabc (patch)
tree48fb9f89910094339c0b70e79fad9177b6ca21cd
parenta63b830554920476881837eeacd4a6b507632b19 (diff)
downloadgperf-8cb07d4235760c949123863c8b22597a06d0dabc.tar.gz
Fix warnings from Autoconf 2.69c.
* configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments. * doc/configure.ac: Likewise. * lib/configure.ac: Likewise. * src/configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments. Use AC_CACHE_CHECK, AC_LANG_PUSH/AC_LANG_POP, AC_COMPILE_IFELSE * tests/configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments. Use ac_cv_c_compiler_gnu instead of ac_cv_prog_gcc, and ac_cv_cxx_compiler_gnu instead of ac_cv_prog_gxx. Don't use 'test' with option '-a'.
-rw-r--r--ChangeLog13
-rw-r--r--configure.ac8
-rw-r--r--doc/configure.ac6
-rw-r--r--lib/configure.ac6
-rw-r--r--src/configure.ac23
-rw-r--r--tests/configure.ac8
6 files changed, 44 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 25615b3..0463d10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2020-10-04 Bruno Haible <bruno@clisp.org>
+
+ Fix warnings from Autoconf 2.69c.
+ * configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments.
+ * doc/configure.ac: Likewise.
+ * lib/configure.ac: Likewise.
+ * src/configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments. Use
+ AC_CACHE_CHECK, AC_LANG_PUSH/AC_LANG_POP, AC_COMPILE_IFELSE
+ * tests/configure.ac: Invoke AC_INIT, AC_OUTPUT without arguments. Use
+ ac_cv_c_compiler_gnu instead of ac_cv_prog_gcc, and
+ ac_cv_cxx_compiler_gnu instead of ac_cv_prog_gxx. Don't use 'test' with
+ option '-a'.
+
2020-08-30 Bruno Haible <bruno@clisp.org>
Make the code C++17 compliant.
diff --git a/configure.ac b/configure.ac
index 1c269f6..98fe176 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,13 +20,16 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
-AC_INIT([doc/gperf.texi])
+AC_INIT
+AC_CONFIG_SRCDIR([doc/gperf.texi])
AC_CONFIG_AUX_DIR([build-aux])
AC_PROG_MAKE_SET
AC_OBJEXT
AC_EXEEXT
+AC_CONFIG_FILES([Makefile])
+
AC_CONFIG_SUBDIRS([lib src tests doc])
dnl This piece of sed script replaces every line containing '@subdir@'
@@ -49,4 +52,5 @@ p
d
}
'
-AC_OUTPUT([Makefile])
+
+AC_OUTPUT
diff --git a/doc/configure.ac b/doc/configure.ac
index 2ec24cf..4b93c1b 100644
--- a/doc/configure.ac
+++ b/doc/configure.ac
@@ -20,7 +20,8 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
-AC_INIT([gperf.texi])
+AC_INIT
+AC_CONFIG_SRCDIR([gperf.texi])
PACKAGE=gperf
AC_SUBST([PACKAGE])
AC_PROG_MAKE_SET
@@ -32,4 +33,5 @@ CL_PROG_INSTALL
dnl
dnl That's it.
dnl
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/lib/configure.ac b/lib/configure.ac
index cb31722..da40663 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -20,7 +20,8 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
-AC_INIT([hash.cc])
+AC_INIT
+AC_CONFIG_SRCDIR([hash.cc])
AC_PROG_MAKE_SET
dnl
dnl checks for programs
@@ -42,4 +43,5 @@ CL_PROG_INSTALL
dnl
dnl That's it.
dnl
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/src/configure.ac b/src/configure.ac
index 9a76644..892a053 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -20,7 +20,8 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
-AC_INIT([main.cc])
+AC_INIT
+AC_CONFIG_SRCDIR([main.cc])
AC_CONFIG_HEADERS([config.h])
AC_PROG_MAKE_SET
dnl
@@ -39,15 +40,14 @@ CL_PROG_INSTALL
dnl
dnl checks for compiler characteristics
dnl
-AC_MSG_CHECKING([for stack-allocated variable-size arrays])
-AC_CACHE_VAL([gp_cv_cxx_dynamic_array], [
-AC_LANG_SAVE()
-AC_LANG_CPLUSPLUS()
-AC_TRY_COMPILE([int func (int n) { int dynamic_array[n]; }], [],
- [gp_cv_cxx_dynamic_array=yes], [gp_cv_cxx_dynamic_array=no])
-AC_LANG_RESTORE()
-])
-AC_MSG_RESULT([$gp_cv_cxx_dynamic_array])
+AC_CACHE_CHECK([for stack-allocated variable-size arrays],
+ [gp_cv_cxx_dynamic_array],
+ [AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[int func (int n) { int dynamic_array[n]; }]], [[]])],
+ [gp_cv_cxx_dynamic_array=yes], [gp_cv_cxx_dynamic_array=no])
+ AC_LANG_POP([C++])
+ ])
if test $gp_cv_cxx_dynamic_array = yes; then
AC_DEFINE([HAVE_DYNAMIC_ARRAY], [1],
[Define if the C++ compiler supports stack-allocated variable-size arrays.])
@@ -63,4 +63,5 @@ AC_SUBST([GPERF_LIBM])
dnl
dnl That's it.
dnl
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/tests/configure.ac b/tests/configure.ac
index bc8b6a6..55d87b8 100644
--- a/tests/configure.ac
+++ b/tests/configure.ac
@@ -20,7 +20,8 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
-AC_INIT([c-parse.gperf])
+AC_INIT
+AC_CONFIG_SRCDIR([c-parse.gperf])
AC_PROG_MAKE_SET
dnl
dnl checks for programs
@@ -33,7 +34,7 @@ AC_PROG_CXX
dnl sets variable CXX
AC_PROG_CXXCPP
dnl sets variable CXXCPP
-if test $ac_cv_prog_gcc = yes -a $ac_cv_prog_gxx = yes; then
+if test $ac_cv_c_compiler_gnu = yes && test $ac_cv_cxx_compiler_gnu = yes; then
CHECK_LANG_SYNTAX='check-lang-syntax'
else
CHECK_LANG_SYNTAX=''
@@ -42,4 +43,5 @@ AC_SUBST([CHECK_LANG_SYNTAX])
dnl
dnl That's it.
dnl
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT