Skip to content

Commit a49f241

Browse files
authored
Merge pull request #2317 from div72/update-m4
build: update m4
2 parents a3aa840 + 30fb826 commit a49f241

15 files changed

+2764
-2392
lines changed

build-aux/m4/ax_boost_base.m4

Lines changed: 134 additions & 122 deletions
Large diffs are not rendered by default.

build-aux/m4/ax_boost_chrono.m4

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
33
# ===========================================================================
44
#
55
# SYNOPSIS
@@ -8,7 +8,7 @@
88
#
99
# DESCRIPTION
1010
#
11-
# Test for System library from the Boost C++ libraries. The macro requires
11+
# Test for Chrono library from the Boost C++ libraries. The macro requires
1212
# a preceding call to AX_BOOST_BASE. Further documentation is available at
1313
# <http://randspringer.de/boost/index.html>.
1414
#
@@ -29,7 +29,7 @@
2929
# and this notice are preserved. This file is offered as-is, without any
3030
# warranty.
3131

32-
#serial 1
32+
#serial 5
3333

3434
AC_DEFUN([AX_BOOST_CHRONO],
3535
[
@@ -68,7 +68,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
6868
CXXFLAGS_SAVE=$CXXFLAGS
6969
7070
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
71-
[[boost::chrono::system_clock::time_point time;]])],
71+
[[boost::chrono::system_clock::time_point* time = new boost::chrono::system_clock::time_point; delete time;]])],
7272
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
7373
CXXFLAGS=$CXXFLAGS_SAVE
7474
AC_LANG_POP([C++])
@@ -81,7 +81,6 @@ AC_DEFUN([AX_BOOST_CHRONO],
8181
8282
LDFLAGS_SAVE=$LDFLAGS
8383
if test "x$ax_boost_user_chrono_lib" = "x"; then
84-
ax_lib=
8584
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
8685
ax_lib=${libextension}
8786
AC_CHECK_LIB($ax_lib, exit,
@@ -106,7 +105,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
106105
107106
fi
108107
if test "x$ax_lib" = "x"; then
109-
AC_MSG_ERROR(Could not find a version of the boost_chrono library!)
108+
AC_MSG_ERROR(Could not find a version of the Boost::Chrono library!)
110109
fi
111110
if test "x$link_chrono" = "xno"; then
112111
AC_MSG_ERROR(Could not link against $ax_lib !)

build-aux/m4/ax_boost_filesystem.m4

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
33
# ===========================================================================
44
#
55
# SYNOPSIS
@@ -31,7 +31,7 @@
3131
# and this notice are preserved. This file is offered as-is, without any
3232
# warranty.
3333

34-
#serial 26
34+
#serial 28
3535

3636
AC_DEFUN([AX_BOOST_FILESYSTEM],
3737
[
@@ -80,7 +80,6 @@ AC_DEFUN([AX_BOOST_FILESYSTEM],
8080
if test "x$ax_cv_boost_filesystem" = "xyes"; then
8181
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
8282
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
83-
ax_lib=
8483
if test "x$ax_boost_user_filesystem_lib" = "x"; then
8584
for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
8685
ax_lib=${libextension}
@@ -105,7 +104,7 @@ AC_DEFUN([AX_BOOST_FILESYSTEM],
105104
106105
fi
107106
if test "x$ax_lib" = "x"; then
108-
AC_MSG_ERROR(Could not find a version of the boost_filesystem library!)
107+
AC_MSG_ERROR(Could not find a version of the Boost::Filesystem library!)
109108
fi
110109
if test "x$link_filesystem" != "xyes"; then
111110
AC_MSG_ERROR(Could not link against $ax_lib !)

build-aux/m4/ax_boost_iostreams.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# and this notice are preserved. This file is offered as-is, without any
3030
# warranty.
3131

32-
#serial 21
32+
#serial 22
3333

3434
AC_DEFUN([AX_BOOST_IOSTREAMS],
3535
[
@@ -103,7 +103,7 @@ AC_DEFUN([AX_BOOST_IOSTREAMS],
103103
104104
fi
105105
if test "x$ax_lib" = "x"; then
106-
AC_MSG_ERROR(Could not find a version of the library!)
106+
AC_MSG_ERROR(Could not find a version of the Boost::IOStreams library!)
107107
fi
108108
if test "x$link_iostreams" != "xyes"; then
109109
AC_MSG_ERROR(Could not link against $ax_lib !)

build-aux/m4/ax_boost_system.m4

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
33
# ===========================================================================
44
#
55
# SYNOPSIS
@@ -31,7 +31,7 @@
3131
# and this notice are preserved. This file is offered as-is, without any
3232
# warranty.
3333

34-
#serial 18
34+
#serial 20
3535

3636
AC_DEFUN([AX_BOOST_SYSTEM],
3737
[
@@ -84,7 +84,6 @@ AC_DEFUN([AX_BOOST_SYSTEM],
8484
8585
LDFLAGS_SAVE=$LDFLAGS
8686
if test "x$ax_boost_user_system_lib" = "x"; then
87-
ax_lib=
8887
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
8988
ax_lib=${libextension}
9089
AC_CHECK_LIB($ax_lib, exit,
@@ -109,7 +108,7 @@ AC_DEFUN([AX_BOOST_SYSTEM],
109108
110109
fi
111110
if test "x$ax_lib" = "x"; then
112-
AC_MSG_ERROR(Could not find a version of the boost_system library!)
111+
AC_MSG_ERROR(Could not find a version of the Boost::System library!)
113112
fi
114113
if test "x$link_system" = "xno"; then
115114
AC_MSG_ERROR(Could not link against $ax_lib !)

build-aux/m4/ax_boost_thread.m4

Lines changed: 108 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
33
# ===========================================================================
44
#
55
# SYNOPSIS
@@ -30,121 +30,158 @@
3030
# and this notice are preserved. This file is offered as-is, without any
3131
# warranty.
3232

33-
#serial 27
33+
#serial 33
3434

3535
AC_DEFUN([AX_BOOST_THREAD],
3636
[
37-
AC_ARG_WITH([boost-thread],
38-
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
39-
[use the Thread library from boost - it is possible to specify a certain library for the linker
40-
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
37+
AC_ARG_WITH([boost-thread],
38+
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
39+
[use the Thread library from boost -
40+
it is possible to specify a certain library for the linker
41+
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
4142
[
42-
if test "$withval" = "no"; then
43-
want_boost="no"
44-
elif test "$withval" = "yes"; then
43+
if test "$withval" = "yes"; then
4544
want_boost="yes"
4645
ax_boost_user_thread_lib=""
4746
else
48-
want_boost="yes"
49-
ax_boost_user_thread_lib="$withval"
50-
fi
47+
want_boost="yes"
48+
ax_boost_user_thread_lib="$withval"
49+
fi
5150
],
5251
[want_boost="yes"]
53-
)
52+
)
5453
55-
if test "x$want_boost" = "xyes"; then
54+
if test "x$want_boost" = "xyes"; then
5655
AC_REQUIRE([AC_PROG_CC])
5756
AC_REQUIRE([AC_CANONICAL_BUILD])
58-
CPPFLAGS_SAVED="$CPPFLAGS"
59-
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
60-
export CPPFLAGS
57+
CPPFLAGS_SAVED="$CPPFLAGS"
58+
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
59+
export CPPFLAGS
6160
62-
LDFLAGS_SAVED="$LDFLAGS"
63-
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
64-
export LDFLAGS
61+
LDFLAGS_SAVED="$LDFLAGS"
62+
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
63+
export LDFLAGS
6564
6665
AC_CACHE_CHECK(whether the Boost::Thread library is available,
67-
ax_cv_boost_thread,
66+
ax_cv_boost_thread,
6867
[AC_LANG_PUSH([C++])
69-
CXXFLAGS_SAVE=$CXXFLAGS
68+
CXXFLAGS_SAVE=$CXXFLAGS
69+
70+
case "x$host_os" in
71+
xsolaris )
72+
CXXFLAGS="-pthreads $CXXFLAGS"
73+
break;
74+
;;
75+
xmingw32 )
76+
CXXFLAGS="-mthreads $CXXFLAGS"
77+
break;
78+
;;
79+
*android* )
80+
break;
81+
;;
82+
* )
83+
CXXFLAGS="-pthread $CXXFLAGS"
84+
break;
85+
;;
86+
esac
7087
71-
if test "x$host_os" = "xsolaris" ; then
72-
CXXFLAGS="-pthreads $CXXFLAGS"
73-
elif test "x$host_os" = "xmingw32" ; then
74-
CXXFLAGS="-mthreads $CXXFLAGS"
75-
else
76-
CXXFLAGS="-pthread $CXXFLAGS"
77-
fi
78-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
79-
[[boost::thread_group thrds;
80-
return 0;]])],
81-
ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
82-
CXXFLAGS=$CXXFLAGS_SAVE
88+
AC_COMPILE_IFELSE([
89+
AC_LANG_PROGRAM(
90+
[[@%:@include <boost/thread/thread.hpp>]],
91+
[[boost::thread_group thrds;
92+
return 0;]])],
93+
ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
94+
CXXFLAGS=$CXXFLAGS_SAVE
8395
AC_LANG_POP([C++])
84-
])
85-
if test "x$ax_cv_boost_thread" = "xyes"; then
86-
if test "x$host_os" = "xsolaris" ; then
87-
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
88-
elif test "x$host_os" = "xmingw32" ; then
89-
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
90-
else
91-
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
92-
fi
96+
])
97+
if test "x$ax_cv_boost_thread" = "xyes"; then
98+
case "x$host_os" in
99+
xsolaris )
100+
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
101+
break;
102+
;;
103+
xmingw32 )
104+
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
105+
break;
106+
;;
107+
*android* )
108+
break;
109+
;;
110+
* )
111+
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
112+
break;
113+
;;
114+
esac
93115
94-
AC_SUBST(BOOST_CPPFLAGS)
116+
AC_SUBST(BOOST_CPPFLAGS)
95117
96-
AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
118+
AC_DEFINE(HAVE_BOOST_THREAD,,
119+
[define if the Boost::Thread library is available])
97120
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
98121
99-
LDFLAGS_SAVE=$LDFLAGS
122+
LDFLAGS_SAVE=$LDFLAGS
100123
case "x$host_os" in
101124
*bsd* )
102125
LDFLAGS="-pthread $LDFLAGS"
103126
break;
104127
;;
105128
esac
106129
if test "x$ax_boost_user_thread_lib" = "x"; then
107-
ax_lib=
108130
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
109131
ax_lib=${libextension}
110-
AC_CHECK_LIB($ax_lib, exit,
111-
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
132+
AC_CHECK_LIB($ax_lib, exit,
133+
[link_thread="yes"; break],
112134
[link_thread="no"])
113-
done
135+
done
114136
if test "x$link_thread" != "xyes"; then
115137
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
116138
ax_lib=${libextension}
117-
AC_CHECK_LIB($ax_lib, exit,
118-
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
139+
AC_CHECK_LIB($ax_lib, exit,
140+
[link_thread="yes"; break],
119141
[link_thread="no"])
120-
done
142+
done
121143
fi
122144
123145
else
124146
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
125-
AC_CHECK_LIB($ax_lib, exit,
126-
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
147+
AC_CHECK_LIB($ax_lib, exit,
148+
[link_thread="yes"; break],
127149
[link_thread="no"])
128150
done
129151
130152
fi
131153
if test "x$ax_lib" = "x"; then
132-
AC_MSG_ERROR(Could not find a version of the boost_thread library!)
154+
AC_MSG_ERROR(Could not find a version of the Boost::Thread library!)
133155
fi
134-
if test "x$link_thread" = "xno"; then
135-
AC_MSG_ERROR(Could not link against $ax_lib !)
136-
else
137-
case "x$host_os" in
138-
*bsd* )
139-
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
140-
break;
141-
;;
142-
esac
143-
144-
fi
145-
fi
156+
if test "x$link_thread" = "xno"; then
157+
AC_MSG_ERROR(Could not link against $ax_lib !)
158+
else
159+
BOOST_THREAD_LIB="-l$ax_lib"
160+
case "x$host_os" in
161+
*bsd* )
162+
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
163+
break;
164+
;;
165+
xsolaris )
166+
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
167+
break;
168+
;;
169+
xmingw32 )
170+
break;
171+
;;
172+
*android* )
173+
break;
174+
;;
175+
* )
176+
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
177+
break;
178+
;;
179+
esac
180+
AC_SUBST(BOOST_THREAD_LIB)
181+
fi
182+
fi
146183
147-
CPPFLAGS="$CPPFLAGS_SAVED"
148-
LDFLAGS="$LDFLAGS_SAVED"
149-
fi
184+
CPPFLAGS="$CPPFLAGS_SAVED"
185+
LDFLAGS="$LDFLAGS_SAVED"
186+
fi
150187
])

0 commit comments

Comments
 (0)