Skip to content

Commit cf5c786

Browse files
committed
[build-aux] Update Boost & check macros to latest serials
1 parent f034bce commit cf5c786

File tree

8 files changed

+395
-219
lines changed

8 files changed

+395
-219
lines changed

build-aux/m4/ax_boost_base.m4

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# and this notice are preserved. This file is offered as-is, without any
3434
# warranty.
3535

36-
#serial 23
36+
#serial 26
3737

3838
AC_DEFUN([AX_BOOST_BASE],
3939
[
@@ -95,8 +95,8 @@ if test "x$want_boost" = "xyes"; then
9595
x86_64)
9696
libsubdirs="lib64 libx32 lib lib64"
9797
;;
98-
ppc64|s390x|sparc64|aarch64)
99-
libsubdirs="lib64 lib lib64"
98+
ppc64|s390x|sparc64|aarch64|ppc64le)
99+
libsubdirs="lib64 lib lib64 ppc64le"
100100
;;
101101
esac
102102
@@ -170,7 +170,7 @@ if test "x$want_boost" = "xyes"; then
170170
AC_MSG_RESULT(yes)
171171
succeeded=yes
172172
found_system=yes
173-
],[:
173+
],[
174174
])
175175
AC_LANG_POP([C++])
176176
@@ -179,6 +179,10 @@ if test "x$want_boost" = "xyes"; then
179179
dnl if we found no boost with system layout we search for boost libraries
180180
dnl built and installed without the --layout=system option or for a staged(not installed) version
181181
if test "x$succeeded" != "xyes"; then
182+
CPPFLAGS="$CPPFLAGS_SAVED"
183+
LDFLAGS="$LDFLAGS_SAVED"
184+
BOOST_CPPFLAGS=
185+
BOOST_LDFLAGS=
182186
_version=0
183187
if test "$ac_boost_path" != ""; then
184188
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
@@ -191,6 +195,12 @@ if test "x$want_boost" = "xyes"; then
191195
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
192196
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
193197
done
198+
dnl if nothing found search for layout used in Windows distributions
199+
if test -z "$BOOST_CPPFLAGS"; then
200+
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
201+
BOOST_CPPFLAGS="-I$ac_boost_path"
202+
fi
203+
fi
194204
fi
195205
else
196206
if test "$cross_compiling" != yes; then
@@ -253,7 +263,7 @@ if test "x$want_boost" = "xyes"; then
253263
AC_MSG_RESULT(yes)
254264
succeeded=yes
255265
found_system=yes
256-
],[:
266+
],[
257267
])
258268
AC_LANG_POP([C++])
259269
fi

build-aux/m4/ax_boost_program_options.m4

Lines changed: 3 additions & 4 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 22
32+
#serial 24
3333

3434
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
3535
[
@@ -63,9 +63,9 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
6363
AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
6464
ax_cv_boost_program_options,
6565
[AC_LANG_PUSH(C++)
66-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
66+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options/errors.hpp>
6767
]],
68-
[[boost::program_options::options_description generic("Generic options");
68+
[[boost::program_options::error err("Error message");
6969
return 0;]])],
7070
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
7171
AC_LANG_POP([C++])
@@ -74,7 +74,6 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
7474
AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
7575
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
7676
if test "x$ax_boost_user_program_options_lib" = "x"; then
77-
ax_lib=
7877
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
7978
ax_lib=${libextension}
8079
AC_CHECK_LIB($ax_lib, exit,

build-aux/m4/ax_boost_system.m4

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

34-
#serial 17
34+
#serial 18
3535

3636
AC_DEFUN([AX_BOOST_SYSTEM],
3737
[
@@ -68,9 +68,10 @@ AC_DEFUN([AX_BOOST_SYSTEM],
6868
ax_cv_boost_system,
6969
[AC_LANG_PUSH([C++])
7070
CXXFLAGS_SAVE=$CXXFLAGS
71+
CXXFLAGS=
7172
7273
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
73-
[[boost::system::system_category]])],
74+
[[boost::system::error_category *a = 0;]])],
7475
ax_cv_boost_system=yes, ax_cv_boost_system=no)
7576
CXXFLAGS=$CXXFLAGS_SAVE
7677
AC_LANG_POP([C++])

build-aux/m4/ax_check_compile_flag.m4

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SYNOPSIS
66
#
7-
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
7+
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
88
#
99
# DESCRIPTION
1010
#
@@ -19,6 +19,8 @@
1919
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
2020
# force the compiler to issue an error when a bad flag is given.
2121
#
22+
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
23+
#
2224
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
2325
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
2426
#
@@ -53,19 +55,19 @@
5355
# modified version of the Autoconf Macro, you may extend this special
5456
# exception to the GPL to apply to your modified version as well.
5557

56-
#serial 2
58+
#serial 4
5759

5860
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
59-
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
61+
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
6062
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
6163
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
6264
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
6365
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
64-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
66+
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
6567
[AS_VAR_SET(CACHEVAR,[yes])],
6668
[AS_VAR_SET(CACHEVAR,[no])])
6769
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
68-
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
70+
AS_VAR_IF(CACHEVAR,yes,
6971
[m4_default([$2], :)],
7072
[m4_default([$3], :)])
7173
AS_VAR_POPDEF([CACHEVAR])dnl

build-aux/m4/ax_check_link_flag.m4

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SYNOPSIS
66
#
7-
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
7+
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
88
#
99
# DESCRIPTION
1010
#
@@ -19,6 +19,8 @@
1919
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
2020
# issue an error when a bad flag is given.
2121
#
22+
# INPUT gives an alternative input source to AC_LINK_IFELSE.
23+
#
2224
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
2325
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
2426
#
@@ -53,18 +55,19 @@
5355
# modified version of the Autoconf Macro, you may extend this special
5456
# exception to the GPL to apply to your modified version as well.
5557

56-
#serial 2
58+
#serial 4
5759

5860
AC_DEFUN([AX_CHECK_LINK_FLAG],
59-
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
61+
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
62+
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
6063
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
6164
ax_check_save_flags=$LDFLAGS
6265
LDFLAGS="$LDFLAGS $4 $1"
63-
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
66+
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
6467
[AS_VAR_SET(CACHEVAR,[yes])],
6568
[AS_VAR_SET(CACHEVAR,[no])])
6669
LDFLAGS=$ax_check_save_flags])
67-
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
70+
AS_VAR_IF(CACHEVAR,yes,
6871
[m4_default([$2], :)],
6972
[m4_default([$3], :)])
7073
AS_VAR_POPDEF([CACHEVAR])dnl

build-aux/m4/ax_check_preproc_flag.m4

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SYNOPSIS
66
#
7-
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
7+
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
88
#
99
# DESCRIPTION
1010
#
@@ -19,6 +19,8 @@
1919
# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the
2020
# preprocessor to issue an error when a bad flag is given.
2121
#
22+
# INPUT gives an alternative input source to AC_PREPROC_IFELSE.
23+
#
2224
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
2325
# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG.
2426
#
@@ -53,19 +55,19 @@
5355
# modified version of the Autoconf Macro, you may extend this special
5456
# exception to the GPL to apply to your modified version as well.
5557

56-
#serial 2
58+
#serial 4
5759

5860
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
59-
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
61+
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
6062
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
6163
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
6264
ax_check_save_flags=$CPPFLAGS
6365
CPPFLAGS="$CPPFLAGS $4 $1"
64-
AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
66+
AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
6567
[AS_VAR_SET(CACHEVAR,[yes])],
6668
[AS_VAR_SET(CACHEVAR,[no])])
6769
CPPFLAGS=$ax_check_save_flags])
68-
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
70+
AS_VAR_IF(CACHEVAR,yes,
6971
[m4_default([$2], :)],
7072
[m4_default([$3], :)])
7173
AS_VAR_POPDEF([CACHEVAR])dnl

build-aux/m4/ax_gcc_func_attribute.m4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# cold
3232
# const
3333
# constructor
34+
# constructor_priority for constructor attribute with priority
3435
# deprecated
3536
# destructor
3637
# dllexport
@@ -73,7 +74,7 @@
7374
# and this notice are preserved. This file is offered as-is, without any
7475
# warranty.
7576

76-
#serial 2
77+
#serial 3
7778

7879
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
7980
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
@@ -103,6 +104,9 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
103104
[const], [
104105
int foo( void ) __attribute__(($1));
105106
],
107+
[constructor_priority], [
108+
int foo( void ) __attribute__((__constructor__(65535/2)));
109+
],
106110
[constructor], [
107111
int foo( void ) __attribute__(($1));
108112
],
@@ -180,6 +184,8 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
180184
[visibility], [
181185
int foo_def( void ) __attribute__(($1("default")));
182186
int foo_hid( void ) __attribute__(($1("hidden")));
187+
int foo_int( void ) __attribute__(($1("internal")));
188+
int foo_pro( void ) __attribute__(($1("protected")));
183189
],
184190
[warning], [
185191
int foo( void ) __attribute__(($1("")));

0 commit comments

Comments
 (0)