Changeset 3720


Ignore:
Timestamp:
Nov 21, 2017, 5:06:21 AM (4 years ago)
Author:
Peter
Message:

update to autoconf-archive 2017.09.28

Location:
trunk/m4
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/ax_append_compile_flags.m4

    r3171 r3720  
    1 # ===========================================================================
    2 #  http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
    3 # ===========================================================================
     1# ============================================================================
     2#  https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
     3# ============================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
     7#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2020#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
    2121#   force the compiler to issue an error when a bad flag is given.
     22#
     23#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
    2224#
    2325#   NOTE: This macro depends on the AX_APPEND_FLAG and
     
    4042#
    4143#   You should have received a copy of the GNU General Public License along
    42 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     44#   with this program. If not, see <https://www.gnu.org/licenses/>.
    4345#
    4446#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5557#   exception to the GPL to apply to your modified version as well.
    5658
    57 #serial 4
     59#serial 6
    5860
    5961AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
     
    6163AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
    6264for flag in $1; do
    63   AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
     65  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
    6466done
    6567])dnl AX_APPEND_COMPILE_FLAGS
  • trunk/m4/ax_append_flag.m4

    r3424 r3720  
    11# ===========================================================================
    2 #      http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
     2#      https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
    33# ===========================================================================
    44#
     
    3535#
    3636#   You should have received a copy of the GNU General Public License along
    37 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     37#   with this program. If not, see <https://www.gnu.org/licenses/>.
    3838#
    3939#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5050#   exception to the GPL to apply to your modified version as well.
    5151
    52 #serial 6
     52#serial 7
    5353
    5454AC_DEFUN([AX_APPEND_FLAG],
  • trunk/m4/ax_append_link_flags.m4

    r3171 r3720  
    11# ===========================================================================
    2 #   http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
     2#   https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
    33# ===========================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
     7#   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    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.
     21#
     22#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
    2123#
    2224#   NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
     
    3840#
    3941#   You should have received a copy of the GNU General Public License along
    40 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     42#   with this program. If not, see <https://www.gnu.org/licenses/>.
    4143#
    4244#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5355#   exception to the GPL to apply to your modified version as well.
    5456
    55 #serial 4
     57#serial 6
    5658
    5759AC_DEFUN([AX_APPEND_LINK_FLAGS],
     
    5961AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
    6062for flag in $1; do
    61   AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
     63  AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
    6264done
    6365])dnl AX_APPEND_LINK_FLAGS
  • trunk/m4/ax_boost_base.m4

    r3424 r3720  
    11# ===========================================================================
    2 #       http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
     2#      https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
    33# ===========================================================================
    44#
     
    3434#   warranty.
    3535
    36 #serial 26
     36#serial 42
     37
     38# example boost program (need to pass version)
     39m4_define([_AX_BOOST_BASE_PROGRAM],
     40          [AC_LANG_PROGRAM([[
     41#include <boost/version.hpp>
     42]],[[
     43(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
     44]])])
    3745
    3846AC_DEFUN([AX_BOOST_BASE],
     
    4553     @<:@ARG=yes@:>@ ])],
    4654    [
    47     if test "$withval" = "no"; then
    48         want_boost="no"
    49     elif test "$withval" = "yes"; then
    50         want_boost="yes"
    51         ac_boost_path=""
    52     else
    53         want_boost="yes"
    54         ac_boost_path="$withval"
    55     fi
     55     AS_CASE([$withval],
     56       [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
     57       [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
     58       [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
    5659    ],
    5760    [want_boost="yes"])
     
    5962
    6063AC_ARG_WITH([boost-libdir],
    61         AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
    62         [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
    63         [
    64         if test -d "$withval"
    65         then
    66                 ac_boost_lib_path="$withval"
    67         else
    68                 AC_MSG_ERROR(--with-boost-libdir expected directory name)
    69         fi
    70         ],
    71         [ac_boost_lib_path=""]
    72 )
    73 
    74 if test "x$want_boost" = "xyes"; then
    75     boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
    76     boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
    77     boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
    78     boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
    79     boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
    80     if test "x$boost_lib_version_req_sub_minor" = "x" ; then
    81         boost_lib_version_req_sub_minor="0"
    82         fi
    83     WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+  $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
    84     AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
     64  [AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
     65    [Force given directory for boost libraries.
     66     Note that this will override library path detection,
     67     so use this parameter only if default library detection fails
     68     and you know exactly where your boost libraries are located.])],
     69  [
     70   AS_IF([test -d "$withval"],
     71         [_AX_BOOST_BASE_boost_lib_path="$withval"],
     72    [AC_MSG_ERROR([--with-boost-libdir expected directory name])])
     73  ],
     74  [_AX_BOOST_BASE_boost_lib_path=""])
     75
     76BOOST_LDFLAGS=""
     77BOOST_CPPFLAGS=""
     78AS_IF([test "x$want_boost" = "xyes"],
     79      [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
     80AC_SUBST(BOOST_CPPFLAGS)
     81AC_SUBST(BOOST_LDFLAGS)
     82])
     83
     84
     85# convert a version string in $2 to numeric and affect to polymorphic var $1
     86AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
     87  AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
     88  _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
     89  _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
     90  AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
     91        [AC_MSG_ERROR([You should at least specify libboost major version])])
     92  _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
     93  AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
     94        [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
     95  _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
     96  AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
     97        [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
     98  _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+  $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
     99  AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
     100])
     101
     102dnl Run the detection of boost should be run only if $want_boost
     103AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
     104    _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
    85105    succeeded=no
    86106
     107
     108    AC_REQUIRE([AC_CANONICAL_HOST])
    87109    dnl On 64-bit systems check for system libraries in both lib64 and lib.
    88110    dnl The former is specified by FHS, but e.g. Debian does not adhere to
     
    90112    dnl The last entry in the list is chosen by default when no libraries
    91113    dnl are found, e.g. when only header-only libraries are installed!
    92     libsubdirs="lib"
    93     ax_arch=`uname -m`
    94     case $ax_arch in
    95       x86_64)
    96         libsubdirs="lib64 libx32 lib lib64"
    97         ;;
    98       ppc64|s390x|sparc64|aarch64|ppc64le)
    99         libsubdirs="lib64 lib lib64 ppc64le"
    100         ;;
    101     esac
     114    AS_CASE([${host_cpu}],
     115      [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
     116      [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
     117      [libsubdirs="lib"],
     118    )
    102119
    103120    dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
    104121    dnl them priority over the other paths since, if libs are found there, they
    105122    dnl are almost assuredly the ones desired.
    106     AC_REQUIRE([AC_CANONICAL_HOST])
    107     libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
    108 
    109     case ${host_cpu} in
    110       i?86)
    111         libsubdirs="lib/i386-${host_os} $libsubdirs"
    112         ;;
    113     esac
     123    AS_CASE([${host_cpu}],
     124      [i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
     125      [multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
     126    )
    114127
    115128    dnl first we check the system location for boost libraries
    116129    dnl this location ist chosen if boost libraries are installed with the --layout=system option
    117130    dnl or if you install boost with RPM
    118     if test "$ac_boost_path" != ""; then
    119         BOOST_CPPFLAGS="-I$ac_boost_path/include"
    120         for ac_boost_path_tmp in $libsubdirs; do
    121                 if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
    122                         BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
    123                         break
    124                 fi
    125         done
    126     elif test "$cross_compiling" != yes; then
    127         for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
    128             if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
    129                 for libsubdir in $libsubdirs ; do
    130                     if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
     131    AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
     132        AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
     133         AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
     134           AC_MSG_RESULT([yes])
     135           BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
     136           for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
     137                AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
     138                AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
     139                        AC_MSG_RESULT([yes])
     140                        BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
     141                        break;
     142                ],
     143      [AC_MSG_RESULT([no])])
     144           done],[
     145      AC_MSG_RESULT([no])])
     146    ],[
     147        if test X"$cross_compiling" = Xyes; then
     148            search_libsubdirs=$multiarch_libsubdir
     149        else
     150            search_libsubdirs="$multiarch_libsubdir $libsubdirs"
     151        fi
     152        for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
     153            if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
     154                for libsubdir in $search_libsubdirs ; do
     155                    if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
    131156                done
    132                 BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
    133                 BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
     157                BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
     158                BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
    134159                break;
    135160            fi
    136161        done
    137     fi
     162    ])
    138163
    139164    dnl overwrite ld flags if we have required special directory with
    140165    dnl --with-boost-libdir parameter
    141     if test "$ac_boost_lib_path" != ""; then
    142        BOOST_LDFLAGS="-L$ac_boost_lib_path"
    143     fi
    144 
     166    AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
     167          [BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
     168
     169    AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
    145170    CPPFLAGS_SAVED="$CPPFLAGS"
    146171    CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
     
    153178    AC_REQUIRE([AC_PROG_CXX])
    154179    AC_LANG_PUSH(C++)
    155         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
    156     @%:@include <boost/version.hpp>
    157     ]], [[
    158     #if BOOST_VERSION >= $WANT_BOOST_VERSION
    159     // Everything is okay
    160     #else
    161     #  error Boost version is too old
    162     #endif
    163     ]])],[
     180        AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
    164181        AC_MSG_RESULT(yes)
    165182    succeeded=yes
     
    173190    dnl if we found no boost with system layout we search for boost libraries
    174191    dnl built and installed without the --layout=system option or for a staged(not installed) version
    175     if test "x$succeeded" != "xyes"; then
     192    if test "x$succeeded" != "xyes" ; then
    176193        CPPFLAGS="$CPPFLAGS_SAVED"
    177194        LDFLAGS="$LDFLAGS_SAVED"
    178195        BOOST_CPPFLAGS=
    179         BOOST_LDFLAGS=
     196        if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
     197            BOOST_LDFLAGS=
     198        fi
    180199        _version=0
    181         if test "$ac_boost_path" != ""; then
    182             if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
    183                 for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
    184                     _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
     200        if test -n "$_AX_BOOST_BASE_boost_path" ; then
     201            if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
     202                for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
     203                    _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
    185204                    V_CHECK=`expr $_version_tmp \> $_version`
    186                     if test "$V_CHECK" = "1" ; then
     205                    if test "x$V_CHECK" = "x1" ; then
    187206                        _version=$_version_tmp
    188207                    fi
    189208                    VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
    190                     BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
     209                    BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
    191210                done
    192211                dnl if nothing found search for layout used in Windows distributions
    193212                if test -z "$BOOST_CPPFLAGS"; then
    194                     if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
    195                         BOOST_CPPFLAGS="-I$ac_boost_path"
     213                    if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
     214                        BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
    196215                    fi
     216                fi
     217                dnl if we found something and BOOST_LDFLAGS was unset before
     218                dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
     219                if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
     220                    for libsubdir in $libsubdirs ; do
     221                        if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
     222                    done
     223                    BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
    197224                fi
    198225            fi
    199226        else
    200             if test "$cross_compiling" != yes; then
    201                 for ac_boost_path in /usr /usr/local /opt /opt/local ; do
    202                     if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
    203                         for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
    204                             _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
     227            if test "x$cross_compiling" != "xyes" ; then
     228                for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
     229                    if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
     230                        for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
     231                            _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
    205232                            V_CHECK=`expr $_version_tmp \> $_version`
    206                             if test "$V_CHECK" = "1" ; then
     233                            if test "x$V_CHECK" = "x1" ; then
    207234                                _version=$_version_tmp
    208                                 best_path=$ac_boost_path
     235                                best_path=$_AX_BOOST_BASE_boost_path
    209236                            fi
    210237                        done
     
    214241                VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
    215242                BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
    216                 if test "$ac_boost_lib_path" = ""; then
     243                if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
    217244                    for libsubdir in $libsubdirs ; do
    218245                        if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
     
    222249            fi
    223250
    224             if test "x$BOOST_ROOT" != "x"; then
     251            if test -n "$BOOST_ROOT" ; then
    225252                for libsubdir in $libsubdirs ; do
    226253                    if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
     
    231258                        stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
    232259                    V_CHECK=`expr $stage_version_shorten \>\= $_version`
    233                     if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
     260                    if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
    234261                        AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
    235262                        BOOST_CPPFLAGS="-I$BOOST_ROOT"
     
    246273
    247274        AC_LANG_PUSH(C++)
    248             AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
    249         @%:@include <boost/version.hpp>
    250         ]], [[
    251         #if BOOST_VERSION >= $WANT_BOOST_VERSION
    252         // Everything is okay
    253         #else
    254         #  error Boost version is too old
    255         #endif
    256         ]])],[
     275            AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
    257276            AC_MSG_RESULT(yes)
    258277        succeeded=yes
     
    263282    fi
    264283
    265     if test "$succeeded" != "yes" ; then
    266         if test "$_version" = "0" ; then
    267             AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
     284    if test "x$succeeded" != "xyes" ; then
     285        if test "x$_version" = "x0" ; then
     286            AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
    268287        else
    269288            AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
     
    272291        ifelse([$3], , :, [$3])
    273292    else
    274         AC_SUBST(BOOST_CPPFLAGS)
    275         AC_SUBST(BOOST_LDFLAGS)
    276293        AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
    277294        # execute ACTION-IF-FOUND (if present):
     
    281298    CPPFLAGS="$CPPFLAGS_SAVED"
    282299    LDFLAGS="$LDFLAGS_SAVED"
    283 fi
    284300
    285301])
  • trunk/m4/ax_boost_system.m4

    r2880 r3720  
    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#
     
    3232#   warranty.
    3333
    34 #serial 17
     34#serial 19
    3535
    3636AC_DEFUN([AX_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
  • trunk/m4/ax_boost_thread.m4

    r2880 r3720  
    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#
     
    3131#   warranty.
    3232
    33 #serial 27
     33#serial 30
    3434
    3535AC_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
    7069
    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
     70             if test "x$host_os" = "xsolaris" ; then
     71                 CXXFLAGS="-pthreads $CXXFLAGS"
     72             elif test "x$host_os" = "xmingw32" ; then
     73                 CXXFLAGS="-mthreads $CXXFLAGS"
     74             else
     75                CXXFLAGS="-pthread $CXXFLAGS"
     76             fi
     77             AC_COMPILE_IFELSE([
     78                 AC_LANG_PROGRAM(
     79                     [[@%:@include <boost/thread/thread.hpp>]],
     80                     [[boost::thread_group thrds;
     81                       return 0;]])],
     82                 ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
     83             CXXFLAGS=$CXXFLAGS_SAVE
    8384             AC_LANG_POP([C++])
    84     ])
    85     if test "x$ax_cv_boost_thread" = "xyes"; then
     85        ])
     86        if test "x$ax_cv_boost_thread" = "xyes"; then
    8687           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
     88              BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
     89           elif test "x$host_os" = "xmingw32" ; then
     90              BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
     91           else
     92              BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
     93           fi
    9394
    94       AC_SUBST(BOOST_CPPFLAGS)
     95            AC_SUBST(BOOST_CPPFLAGS)
    9596
    96       AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
     97            AC_DEFINE(HAVE_BOOST_THREAD,,
     98                      [define if the Boost::Thread library is available])
    9799            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
    98100
    99       LDFLAGS_SAVE=$LDFLAGS
     101            LDFLAGS_SAVE=$LDFLAGS
    100102                        case "x$host_os" in
    101103                          *bsd* )
     
    107109                for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
    108110                     ax_lib=${libextension}
    109             AC_CHECK_LIB($ax_lib, exit,
    110                                  [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
     111                    AC_CHECK_LIB($ax_lib, exit,
     112                                 [link_thread="yes"; break],
    111113                                 [link_thread="no"])
    112         done
     114                done
    113115                if test "x$link_thread" != "xyes"; then
    114116                for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
    115117                     ax_lib=${libextension}
    116             AC_CHECK_LIB($ax_lib, exit,
    117                                  [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
     118                    AC_CHECK_LIB($ax_lib, exit,
     119                                 [link_thread="yes"; break],
    118120                                 [link_thread="no"])
    119         done
     121                done
    120122                fi
    121123
    122124            else
    123125               for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
    124               AC_CHECK_LIB($ax_lib, exit,
    125                                    [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
     126                      AC_CHECK_LIB($ax_lib, exit,
     127                                   [link_thread="yes"; break],
    126128                                   [link_thread="no"])
    127129                  done
     
    131133                AC_MSG_ERROR(Could not find a version of the library!)
    132134            fi
    133       if test "x$link_thread" = "xno"; then
    134         AC_MSG_ERROR(Could not link against $ax_lib !)
    135                         else
    136                            case "x$host_os" in
    137                               *bsd* )
    138         BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
    139                               break;
    140                               ;;
    141                            esac
     135            if test "x$link_thread" = "xno"; then
     136                AC_MSG_ERROR(Could not link against $ax_lib !)
     137            else
     138                BOOST_THREAD_LIB="-l$ax_lib"
     139                case "x$host_os" in
     140                    *bsd* )
     141                        BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
     142                        break;
     143                        ;;
     144                    solaris )
     145                        BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
     146                        break;
     147                        ;;
     148                    mingw32 )
     149                        break;
     150                        ;;
     151                    * )
     152                        BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
     153                        break;
     154                        ;;
     155                esac
     156                AC_SUBST(BOOST_THREAD_LIB)
     157            fi
     158        fi
    142159
    143       fi
    144     fi
    145 
    146     CPPFLAGS="$CPPFLAGS_SAVED"
    147   LDFLAGS="$LDFLAGS_SAVED"
    148   fi
     160        CPPFLAGS="$CPPFLAGS_SAVED"
     161        LDFLAGS="$LDFLAGS_SAVED"
     162    fi
    149163])
  • trunk/m4/ax_check_compile_flag.m4

    r3367 r3720  
    11# ===========================================================================
    2  http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
     2https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
    33# ===========================================================================
    44#
     
    4141#
    4242#   You should have received a copy of the GNU General Public License along
    43 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     43#   with this program. If not, see <https://www.gnu.org/licenses/>.
    4444#
    4545#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5656#   exception to the GPL to apply to your modified version as well.
    5757
    58 #serial 4
     58#serial 5
    5959
    6060AC_DEFUN([AX_CHECK_COMPILE_FLAG],
  • trunk/m4/ax_check_link_flag.m4

    r3367 r3720  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
     2#    https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
    33# ===========================================================================
    44#
     
    4141#
    4242#   You should have received a copy of the GNU General Public License along
    43 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     43#   with this program. If not, see <https://www.gnu.org/licenses/>.
    4444#
    4545#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5656#   exception to the GPL to apply to your modified version as well.
    5757
    58 #serial 4
     58#serial 5
    5959
    6060AC_DEFUN([AX_CHECK_LINK_FLAG],
  • trunk/m4/ax_check_preproc_flag.m4

    r3367 r3720  
    11# ===========================================================================
    2  http://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
     2https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
    33# ===========================================================================
    44#
     
    4141#
    4242#   You should have received a copy of the GNU General Public License along
    43 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     43#   with this program. If not, see <https://www.gnu.org/licenses/>.
    4444#
    4545#   As a special exception, the respective Autoconf Macro's copyright owner
     
    5656#   exception to the GPL to apply to your modified version as well.
    5757
    58 #serial 4
     58#serial 5
    5959
    6060AC_DEFUN([AX_CHECK_PREPROC_FLAG],
  • trunk/m4/ax_compare_version.m4

    r2724 r3720  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
     2#    https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
    33# ===========================================================================
    44#
     
    8080#   warranty.
    8181
    82 #serial 11
     82#serial 12
    8383
    8484dnl #########################################################################
  • trunk/m4/ax_compiler_vendor.m4

    r3367 r3720  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
     2#    https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
    33# ===========================================================================
    44#
     
    3030#
    3131#   You should have received a copy of the GNU General Public License along
    32 #   with this program. If not, see <http://www.gnu.org/licenses/>.
     32#   with this program. If not, see <https://www.gnu.org/licenses/>.
    3333#
    3434#   As a special exception, the respective Autoconf Macro's copyright owner
     
    4545#   exception to the GPL to apply to your modified version as well.
    4646
    47 #serial 15
    48 
    49 ## Note, we have patch this macro compared to official macro as we've
    50 ## moved down GCC in the list. This was motivated by the fact that
    51 ## many compilers defined __GNUC__ and therefore the test for GCC have
    52 ## many false positives and it is better to have that test as late as
    53 ## possible.
     47#serial 16
    5448
    5549AC_DEFUN([AX_COMPILER_VENDOR],
     
    6357           cray:      _CRAYC
    6458           fujitsu:   __FUJITSU
     59           gnu:       __GNUC__
    6560           sun:       __SUNPRO_C,__SUNPRO_CC
    6661           hp:        __HP_cc,__HP_aCC
     
    7671           portland:  __PGI
    7772     tcc:       __TINYC__
    78            gnu:       __GNUC__
    7973           unknown:   UNKNOWN"
    8074  for ventest in $vendors; do
  • trunk/m4/ax_require_defined.m4

    r3671 r3720  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
     2#    https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
    33# ===========================================================================
    44#
     
    3131#   warranty.
    3232
    33 #serial 1
     33#serial 2
    3434
    3535AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
Note: See TracChangeset for help on using the changeset viewer.