Skip to content

Commit

Permalink
Update autoconf archive macros from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
zerebubuth committed Jan 15, 2016
1 parent 0198240 commit 343f45f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
25 changes: 22 additions & 3 deletions aclocal/ax_boost_base.m4
Expand Up @@ -33,7 +33,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 22
#serial 26

AC_DEFUN([AX_BOOST_BASE],
[
Expand Down Expand Up @@ -92,8 +92,11 @@ if test "x$want_boost" = "xyes"; then
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
x86_64|ppc64|s390x|sparc64|aarch64)
libsubdirs="lib64 lib lib64"
x86_64)
libsubdirs="lib64 libx32 lib lib64"
;;
ppc64|s390x|sparc64|aarch64|ppc64le)
libsubdirs="lib64 lib lib64 ppc64le"
;;
esac
Expand All @@ -103,6 +106,12 @@ if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_CANONICAL_HOST])
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
case ${host_cpu} in
i?86)
libsubdirs="lib/i386-${host_os} $libsubdirs"
;;
esac
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
Expand Down Expand Up @@ -164,6 +173,10 @@ if test "x$want_boost" = "xyes"; then
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
BOOST_CPPFLAGS=
BOOST_LDFLAGS=
_version=0
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
Expand All @@ -176,6 +189,12 @@ if test "x$want_boost" = "xyes"; then
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
dnl if nothing found search for layout used in Windows distributions
if test -z "$BOOST_CPPFLAGS"; then
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
BOOST_CPPFLAGS="-I$ac_boost_path"
fi
fi
fi
else
if test "$cross_compiling" != yes; then
Expand Down
1 change: 1 addition & 0 deletions aclocal/ax_boost_iostreams.m4
Expand Up @@ -75,6 +75,7 @@ AC_DEFUN([AX_BOOST_IOSTREAMS],
ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
AC_LANG_POP([C++])
])
ax_lib=""
if test "x$ax_cv_boost_iostreams" = "xyes"; then
AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
Expand Down
6 changes: 3 additions & 3 deletions aclocal/ax_boost_program_options.m4
Expand Up @@ -29,7 +29,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 22
#serial 24

AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
[
Expand Down Expand Up @@ -63,9 +63,9 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
ax_cv_boost_program_options,
[AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options/errors.hpp>
]],
[[boost::program_options::options_description generic("Generic options");
[[boost::program_options::error err("Error message");
return 0;]])],
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
AC_LANG_POP([C++])
Expand Down
5 changes: 3 additions & 2 deletions aclocal/ax_boost_system.m4
Expand Up @@ -31,7 +31,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 17
#serial 18

AC_DEFUN([AX_BOOST_SYSTEM],
[
Expand Down Expand Up @@ -68,9 +68,10 @@ AC_DEFUN([AX_BOOST_SYSTEM],
ax_cv_boost_system,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
CXXFLAGS=
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
[[boost::system::system_category]])],
[[boost::system::error_category *a = 0;]])],
ax_cv_boost_system=yes, ax_cv_boost_system=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
Expand Down
1 change: 1 addition & 0 deletions aclocal/ax_boost_thread.m4
Expand Up @@ -82,6 +82,7 @@ AC_DEFUN([AX_BOOST_THREAD],
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
ax_lib=""
if test "x$ax_cv_boost_thread" = "xyes"; then
if test "x$host_os" = "xsolaris" ; then
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
Expand Down

0 comments on commit 343f45f

Please sign in to comment.