Skip to content

Commit 11f6f18

Browse files
committed
fix #457
1 parent 036e64f commit 11f6f18

File tree

5 files changed

+65
-53
lines changed

5 files changed

+65
-53
lines changed

NEWS

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
* [DOCUMENTATION] ICU Project site has been moved to <https://icu.unicode.org/>.
1616

17-
* TO DO.. #457: The macro `AC_LANG_CPLUSPLUS' was obsolete.
17+
* [BUILD TIME] #457: The `autoconf` macros `AC_LANG_CPLUSPLUS`
18+
and `AC_TRY_COMPILE` were obsolete.
1819

1920
* TO DO.. #458: 'embedded nul in string'
2021

configure

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for stringi 1.6.
3+
# Generated by GNU Autoconf 2.69 for stringi 1.7.
44
#
55
# Report bugs to <https://stringi.gagolewski.com>.
66
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580580
# Identity of this package.
581581
PACKAGE_NAME='stringi'
582582
PACKAGE_TARNAME='stringi'
583-
PACKAGE_VERSION='1.6'
584-
PACKAGE_STRING='stringi 1.6'
583+
PACKAGE_VERSION='1.7'
584+
PACKAGE_STRING='stringi 1.7'
585585
PACKAGE_BUGREPORT='https://stringi.gagolewski.com'
586586
PACKAGE_URL=''
587587

@@ -1289,7 +1289,7 @@ if test "$ac_init_help" = "long"; then
12891289
# Omit some internal or obsolete options to make the list less imposing.
12901290
# This message is too long to be a string in the A/UX 3.1 sh.
12911291
cat <<_ACEOF
1292-
\`configure' configures stringi 1.6 to adapt to many kinds of systems.
1292+
\`configure' configures stringi 1.7 to adapt to many kinds of systems.
12931293
12941294
Usage: $0 [OPTION]... [VAR=VALUE]...
12951295
@@ -1351,7 +1351,7 @@ fi
13511351

13521352
if test -n "$ac_init_help"; then
13531353
case $ac_init_help in
1354-
short | recursive ) echo "Configuration of stringi 1.6:";;
1354+
short | recursive ) echo "Configuration of stringi 1.7:";;
13551355
esac
13561356
cat <<\_ACEOF
13571357
@@ -1497,7 +1497,7 @@ fi
14971497
test -n "$ac_init_help" && exit $ac_status
14981498
if $ac_init_version; then
14991499
cat <<\_ACEOF
1500-
stringi configure 1.6
1500+
stringi configure 1.7
15011501
generated by GNU Autoconf 2.69
15021502
15031503
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1837,7 +1837,7 @@ cat >config.log <<_ACEOF
18371837
This file contains any messages produced by compilers while
18381838
running configure, to aid debugging if configure makes a mistake.
18391839
1840-
It was created by stringi $as_me 1.6, which was
1840+
It was created by stringi $as_me 1.7, which was
18411841
generated by GNU Autoconf 2.69. Invocation command line was
18421842
18431843
$ $0 $@
@@ -2202,6 +2202,10 @@ ICU_VERSION_NEEDED="55" # minimal version of ICU4C required to build stringi
22022202
22032203
22042204
2205+
2206+
2207+
2208+
22052209
##### OPTIONS #################################################################
22062210
22072211
# shell variables/arguments accepted:
@@ -4149,12 +4153,13 @@ using namespace Outer::Inner; return i;
41494153
return 0;
41504154
}
41514155
_ACEOF
4152-
if ac_fn_cxx_try_compile "$LINENO"; then :
4156+
if ac_fn_cxx_try_link "$LINENO"; then :
41534157
ac_cv_cxx_namespaces=yes
41544158
else
41554159
ac_cv_cxx_namespaces=no
41564160
fi
4157-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4161+
rm -f core conftest.err conftest.$ac_objext \
4162+
conftest$ac_exeext conftest.$ac_ext
41584163
ac_ext=cpp
41594164
ac_cpp='$CXXCPP $CPPFLAGS'
41604165
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4171,8 +4176,8 @@ $as_echo "#define HAVE_NAMESPACES /**/" >>confdefs.h
41714176
41724177
fi
41734178
4174-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Standard Template Library" >&5
4175-
$as_echo_n "checking whether the compiler supports Standard Template Library... " >&6; }
4179+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the Standard Template Library" >&5
4180+
$as_echo_n "checking whether the compiler supports the Standard Template Library... " >&6; }
41764181
if ${ac_cv_cxx_have_stl+:} false; then :
41774182
$as_echo_n "(cached) " >&6
41784183
else
@@ -4200,12 +4205,13 @@ list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
42004205
return 0;
42014206
}
42024207
_ACEOF
4203-
if ac_fn_cxx_try_compile "$LINENO"; then :
4208+
if ac_fn_cxx_try_link "$LINENO"; then :
42044209
ac_cv_cxx_have_stl=yes
42054210
else
42064211
ac_cv_cxx_have_stl=no
42074212
fi
4208-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4213+
rm -f core conftest.err conftest.$ac_objext \
4214+
conftest$ac_exeext conftest.$ac_ext
42094215
ac_ext=cpp
42104216
ac_cpp='$CXXCPP $CPPFLAGS'
42114217
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5659,7 +5665,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56595665
# report actual input values of CONFIG_FILES etc. instead of their
56605666
# values after options handling.
56615667
ac_log="
5662-
This file was extended by stringi $as_me 1.6, which was
5668+
This file was extended by stringi $as_me 1.7, which was
56635669
generated by GNU Autoconf 2.69. Invocation command line was
56645670
56655671
CONFIG_FILES = $CONFIG_FILES
@@ -5712,7 +5718,7 @@ _ACEOF
57125718
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
57135719
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
57145720
ac_cs_version="\\
5715-
stringi config.status 1.6
5721+
stringi config.status 1.7
57165722
configured by $0, generated by GNU Autoconf 2.69,
57175723
with options \\"\$ac_cs_config\\"
57185724

configure.ac

+18-18
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
##### INIT ####################################################################
2121

22-
AC_INIT(stringi, 1.6, https://stringi.gagolewski.com)
22+
AC_INIT([stringi],[1.7],[https://stringi.gagolewski.com])
2323

2424
ICU_VERSION_NEEDED="55" # minimal version of ICU4C required to build stringi
2525
# We still support ICU 55.1 because of... yes, Solaris.
@@ -208,7 +208,7 @@ MSG_CONFIG_FAIL="
208208

209209
# this is inspired by the "Writing R Extensions" manual:
210210
# determine R_HOME directory...
211-
AC_MSG_CHECKING(for R_HOME)
211+
AC_MSG_CHECKING([for R_HOME])
212212
if test -z "${R_HOME}"; then
213213
R_HOME=`R RHOME` # set R_HOME if it has not been set already
214214
fi
@@ -222,7 +222,7 @@ AC_SUBST(R_HOME)
222222

223223

224224
# ...and then R_PATH
225-
AC_MSG_CHECKING(for R)
225+
AC_MSG_CHECKING([for R])
226226
R_PATH="${R_HOME}/bin/R" # see "Writing R Extensions"
227227
if test ! -e "${R_PATH}"; then
228228
# if it was determined by calling `R RHOME`, then this is likely a bug
@@ -242,7 +242,7 @@ else
242242
AC_MSG_RESULT(little)
243243
fi
244244

245-
AC_MSG_CHECKING(for R >= 3.1.0 for C++11 use)
245+
AC_MSG_CHECKING([for R >= 3.1.0 for C++11 use])
246246
R_GE_31=`"${R_PATH}" --vanilla --slave -e 'cat(if (getRversion() >= numeric_version("3.1.0")) "yes" else "no")'`
247247
if test "x$R_GE_31" = "xyes"; then
248248
AC_MSG_RESULT([yes])
@@ -260,7 +260,7 @@ else
260260
fi
261261
fi
262262

263-
AC_MSG_CHECKING(for R < 3.4.0 for CXX1X flag use)
263+
AC_MSG_CHECKING([for R < 3.4.0 for CXX1X flag use])
264264
R_GE_34=`"${R_PATH}" --vanilla --slave -e 'cat(if (getRversion() >= numeric_version("3.4.0")) "yes" else "no")'`
265265
if test "x$R_GE_34" = "xyes"; then
266266
AC_MSG_RESULT([no])
@@ -381,15 +381,15 @@ while true; do
381381

382382

383383
# set ICUDT_DIR
384-
AC_MSG_CHECKING(for local ICUDT_DIR)
384+
AC_MSG_CHECKING([for local ICUDT_DIR])
385385
if test "x$ICUDT_DIR_FORCE" = "xyes"; then
386386
# Remember to update the configure.win file too
387387
ICUDT_DIR="icu${ICU_BUNDLE_VERSION}/data"
388388
fi
389389
AC_MSG_RESULT($ICUDT_DIR)
390390

391391

392-
AC_LANG(C)
392+
AC_LANG([C])
393393
AC_PROG_CC
394394

395395
AC_CHECK_HEADER([elf.h], [
@@ -402,9 +402,9 @@ while true; do
402402
#
403403
# If this is the case, return 0
404404
check_cpp() {
405-
AC_LANG(C++)
405+
AC_LANG([C++])
406406
AC_PROG_CXX
407-
AC_MSG_CHECKING(whether the C++ compiler supports the long long type)
407+
AC_MSG_CHECKING([whether the C++ compiler supports the long long type])
408408
AC_LINK_IFELSE([AC_LANG_SOURCE([
409409
#include <iostream>
410410
using namespace std;
@@ -431,7 +431,7 @@ while true; do
431431
return 1
432432
fi
433433

434-
AC_MSG_CHECKING(whether std::map is available)
434+
AC_MSG_CHECKING([whether std::map is available])
435435
AC_LINK_IFELSE([AC_LANG_SOURCE([
436436
#include <iostream>
437437
#include <map>
@@ -486,7 +486,7 @@ while true; do
486486
fi
487487

488488
# check if pkg-config knows about icu-i18n
489-
AC_MSG_CHECKING(with pkg-config for the system ICU4C)
489+
AC_MSG_CHECKING([with pkg-config for the system ICU4C])
490490
if ! `"${PKG_CONFIG}" --exists icu-i18n icu-uc`; then
491491
# pkg config doesn't know about icu-i18n
492492
AC_MSG_RESULT(no)
@@ -500,7 +500,7 @@ while true; do
500500
AC_MSG_RESULT($ICU_VERSION)
501501

502502
# check for a suitable version
503-
AC_MSG_CHECKING(for ICU4C >= $ICU_VERSION_NEEDED)
503+
AC_MSG_CHECKING([for ICU4C >= $ICU_VERSION_NEEDED])
504504
#VERSION_CHECK=`expr $ICU_VERSION ">=" $ICU_VERSION_NEEDED`
505505
#if test "$VERSION_CHECK" != "1" ; then
506506
if ! `"${PKG_CONFIG}" --atleast-version=${ICU_VERSION_NEEDED} icu-i18n icu-uc`; then
@@ -532,7 +532,7 @@ while true; do
532532
LDFLAGS="${LDFLAGS} ${ICU_LDFLAGS}"
533533
LIBS="${LIBS} ${ICU_LIBS}"
534534

535-
AC_LANG(C++)
535+
AC_LANG([C++])
536536

537537
AC_MSG_CHECKING([whether an ICU4C-based project can be built])
538538
AC_LINK_IFELSE([AC_LANG_SOURCE([
@@ -778,7 +778,7 @@ while true; do
778778

779779
if test ${ICU_BUNDLE_VERSION} -le 60; then
780780
# ICU >=61 doesn't provide any .c files anymore
781-
AC_LANG(C)
781+
AC_LANG([C])
782782
AC_MSG_CHECKING([whether we may compile src/icu${ICU_BUNDLE_VERSION}/common/umapfile.c])
783783
AC_COMPILE_IFELSE([
784784
AC_LANG_SOURCE([`${CAT} src/icu${ICU_BUNDLE_VERSION}/common/umapfile.c`])
@@ -802,7 +802,7 @@ while true; do
802802
])
803803
fi
804804

805-
AC_LANG(C++)
805+
AC_LANG([C++])
806806
AC_MSG_CHECKING([whether we may compile src/icu${ICU_BUNDLE_VERSION}/common/putil.cpp])
807807
AC_COMPILE_IFELSE([
808808
AC_LANG_SOURCE([`${CAT} src/icu${ICU_BUNDLE_VERSION}/common/putil.cpp`])
@@ -827,7 +827,7 @@ while true; do
827827
])
828828

829829
if test ${ICU_BUNDLE_VERSION} -gt 60; then
830-
AC_LANG(C++)
830+
AC_LANG([C++])
831831
AC_MSG_CHECKING([whether we may compile src/icu${ICU_BUNDLE_VERSION}/i18n/number_affixutils.cpp])
832832
AC_COMPILE_IFELSE([
833833
AC_LANG_SOURCE([`${CAT} src/icu${ICU_BUNDLE_VERSION}/i18n/number_affixutils.cpp`])
@@ -857,7 +857,7 @@ while true; do
857857

858858
if test ${ICU_BUNDLE_VERSION} -ge 69; then
859859

860-
AC_MSG_CHECKING(whether alignof(std::max_align_t) is available)
860+
AC_MSG_CHECKING([whether alignof(std::max_align_t) is available])
861861
AC_LINK_IFELSE([AC_LANG_SOURCE([
862862
#include <iostream>
863863
#include <cstddef>
@@ -873,7 +873,7 @@ while true; do
873873
old_with_extra_cxxflags="${with_extra_cxxflags}"
874874
with_extra_cxxflags="${with_extra_cxxflags} -DSTRINGI_MAX_ALIGN_T_STD"
875875
CXXFLAGS="${CXXFLAGS} -D_XPG6"
876-
AC_MSG_CHECKING(whether alignof(::max_align_t) is available)
876+
AC_MSG_CHECKING([whether alignof(::max_align_t) is available])
877877
AC_LINK_IFELSE([AC_LANG_SOURCE([
878878
#include <iostream>
879879
#include <cstddef>

tools/AC_CXX_HAVE_STL.m4

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
1-
dnl
1+
dnl
22
dnl AC_CXX_HAVE_STL
3-
dnl
3+
dnl
44
dnl Description
5-
dnl
5+
dnl
66
dnl If the compiler supports the Standard Template Library, define HAVE_STL.
7-
dnl
8-
dnl Version: 1.2 (last modified: 2000-07-19)
7+
dnl
8+
dnl Version: 1.2.1 (last modified: 2021-10-02)
99
dnl Author: Luc Maisonobe
10-
dnl
10+
dnl
1111
dnl from http://www.gnu.org/software/ac-archive/htmldoc/index.html
12-
dnl
12+
dnl
1313
dnl License:
1414
dnl GNU General Public License
1515
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING.html]
1616
dnl with this special exception
17-
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING-Exception.html].
18-
dnl
17+
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING-Exception.html].
18+
19+
20+
dnl Marek's 2021-10-02 update: replace obsolete AC_TRY_COMPILE, AC_LANG_CPLUSPLUS
21+
1922

2023
AC_DEFUN([AC_CXX_HAVE_STL],
21-
[AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
24+
[AC_CACHE_CHECK(whether the compiler supports the Standard Template Library,
2225
ac_cv_cxx_have_stl,
2326
[AC_REQUIRE([AC_CXX_NAMESPACES])
2427
AC_LANG_SAVE
25-
AC_LANG_CPLUSPLUS
26-
AC_TRY_COMPILE([#include <list>
28+
AC_LANG([C++])
29+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <list>
2730
#include <deque>
2831
#ifdef HAVE_NAMESPACES
2932
using namespace std;
30-
#endif],[list<int> x; x.push_back(5);
31-
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
32-
ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
33+
#endif]],[[list<int> x; x.push_back(5);
34+
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;]])],
35+
[ac_cv_cxx_have_stl=yes], [ac_cv_cxx_have_stl=no])
3336
AC_LANG_RESTORE
3437
])
3538
if test "$ac_cv_cxx_have_stl" = yes; then

tools/AC_CXX_NAMESPACES.m4

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ dnl
66
dnl @category Cxx
77
dnl @author Todd Veldhuizen
88
dnl @author Luc Maisonobe <[email protected]>
9-
dnl @version 2004-02-04
109
dnl @license AllPermissive
10+
dnl @version 2021-10-02
11+
12+
dnl Marek's 2021-10-02 update: replace obsolete AC_TRY_COMPILE, AC_LANG_CPLUSPLUS
1113

1214
AC_DEFUN([AC_CXX_NAMESPACES],
1315
[AC_CACHE_CHECK(whether the compiler implements namespaces,
1416
ac_cv_cxx_namespaces,
1517
[AC_LANG_SAVE
16-
AC_LANG_CPLUSPLUS
17-
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
18-
[using namespace Outer::Inner; return i;],
18+
AC_LANG([C++])
19+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[namespace Outer { namespace Inner { int i = 0; }}]],
20+
[[using namespace Outer::Inner; return i;]])],
1921
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
2022
AC_LANG_RESTORE
2123
])

0 commit comments

Comments
 (0)