This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via abd50139e35c67ddbc1ec09550ea6b6d27861703 (commit)
from 7f5cc90258fe11df6286d9ce562d904e8032c461 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit abd50139e35c67ddbc1ec09550ea6b6d27861703
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Sun Jun 24 13:41:05 2018 -0500
changelog: updates for odp v1.19.0.2
Add updates for ODP v1.19.0.2 (Tiger Moth Service Update 2)
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Bogdan Pricope <bogdan.pricope(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/CHANGELOG b/CHANGELOG
index 96655320..5d7b3567 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,127 @@
+== OpenDataPlane (1.19.0.2)
+=== Summary of Changes
+ODP v1.19.0.2 is the second service update for the Tiger Moth release. It
+incorporates a number of corrections and enhancements that further improve the
+quality and testability of ODP.
+
+==== APIs
+There are no API changes in this release.
+
+==== DPDK Service Release Sync
+ODP is now paired with DPDK 17.11.3 for its DPDK-related support. This is the
+current service level for the DPDK 17.11 LTS package used by ODP Tiger Moth.
+
+=== Implementation Improvements
+This release incorporates several improvements in the `odp-linux` reference
+implementation of ODP.
+
+==== Enhanced Inlining
+ODP supports inlining of functions in embedded environments when ABI
+compatibility is not needed. ODP itself now makes use of inlined functions for
+all relevant internal use of its APIs, leading to improved performance.
+
+==== Completion of CRC API Implementation
+The `odp_hash_crc_gen64()` API is now properly implemented and appropriate
+validation tests added to support it.
+
+In addition, a streamlined table-based implementation of the basic CRC
+functions eliminates the previous dependency on `zlib`.
+
+==== PktIO-Specific Parsing
+To better integrate with DPDK parsing capabilities, ODP packet parsing has
+been restructured to operate at the PktIO level. This permits DPDK PktIO types
+to exploit the native DPDK packet parser and checksum facilities, leading
+to better integration.
+
+==== PktIO Internal Cleanup and Restructure
+The PktIO functions have been streamlined and refactored in a number of ways
+to provide better long-term maintainability of these functions. This includes
+moving per-PktIO data into individual files rather than sharing a common file,
+as well as better placement for I/O statistics.
+
+==== Checksum Validation Support
+Loop PktIO interfaces now add the capability to validate packet L3 and L4
+checksums as part of receive processing. The existing `odp_pktio_capability()`
+API now reports that checksum validation is available for these interfaces.
+
+==== Single Producer / Single Consumer Queue Performance Optimizations
+When defining lock free queues that have only a single producer and consumer,
+a streamlined implementation offers significant speedup.
+
+==== Fast PCAPng Packet Capture
+Fast pcap capture is now provided in `odp-linux` to capture packets on any
+interface. This is enabled via the `--enable-pcapng-support` configuration
+option. Once enabled, packets can be captured using a sequence such as:
+-----
+sudo mkdir /var/run/odp/
+start ODP application that reads/writes to the interface of interest
+start the ODP application
+sudo dd if=/var/run/odp/<pid>-<ifname>-flow-<queue#> of=~/test.pcap
+
+cntrl^c to end capture
+wireshark ~/test.pcap to view capture
+-----
+
+Interfaces of interest are identified by a string consisting of the
+application process ID, the interface name, and the queue number of interest,
+if the interface supports multiple queues.
+
+==== Removal of GPL M4 Macros
+A number of autotools/autoconf M4 macros used in configuring `odp-linux` have
+been rewritten to avoid potential GPL licensing concerns. These macros are
+used only during ODP configuration processing and have no role in ODP
+or ODP application use.
+
+=== Validation Test Improvements
+==== Queue Pair Validation Tests
+The validation test suite for queue API testing is enhanced to now test
+operation on queue pairs properly. This enables the various enqueue/dequeue
+modes defined by the ODP specification to be more fully exercised, leading
+to improved API conformance.
+
+==== Scheduling Test Improvements
+The scheduling validation tests now better use the various capability APIs to
+ensure that implementations are only tested for advertised capabilities.
+
+=== Crypto Test Improvements
+The crypto validation tests now better use the various capability APIs to
+ensure that implementations are tested across advertised crypto capabilities.
+
+=== Performance Test Improvements
+==== New Performance Test
+A new `odp_queue_perf` test has been added to test plain (non-scheduled)
+queue performance in various modes.
+
+=== Helper Changes
+* The `getopt` library calls are no longer used to avoid packaging conflicts
+that can arise with this use. There are no changes to helper functionality.
+This change simply improves packaging.
+
+=== Examples Improvements
+* The `odp_generator` example adds UDP port range support.
+
+==== CI Improvements
+Numerous changes to Travis integration are added to improve the quality and
+reliability of Continuous Integration (CI) testing.
+
+=== Bug Fixes
+==== https://bugs.linaro.org/show_bug.cgi?id=3787[Bug 3787]
+Timeout accuracy breaks down with odd resolution requests
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3867[Bug 3867]
+timer validation test fails when using 1GB huge pages
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3879[Bug 3879]
+example/l2fwd_simple fails on some systems when using 1GB huge pages
+
+=== Unnumbered Bug Fixes
+* Corrected the handling of timeout events in the scalable scheduler.
+* Fixed IPsec link order to streamline builds.
+
+=== Known Issues
+==== https://bugs.linaro.org/show_bug.cgi?id=3774[Bug 3774]
+Shmem validation test runs indefinitely with 1GB huge pages
+
== OpenDataPlane (1.19.0.1)
=== Summary of Changes
ODP v1.19.0.1 is the first service update for the Tiger Moth release. It
-----------------------------------------------------------------------
Summary of changes:
CHANGELOG | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 124 insertions(+)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via eaf3b566293fa2bc10bb5b99b38ad75f4914b1ab (commit)
from 0ebd57ab0ea8e1a95cdb8a564fcaec4cad6231e7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eaf3b566293fa2bc10bb5b99b38ad75f4914b1ab
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Tue Jun 26 23:52:35 2018 +0300
validatation: fix tm wred test under loaded system
Fix following bug with skipping test result is CI env
variable was set.
Test failed at line 3139 in file traffic_mngr.c :
(wred_pkt_cnts->min_cnt <= pkts_sent) &&
(pkts_sent <= wred_pkt_cnts->max_cnt)
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
diff --git a/test/validation/api/traffic_mngr/traffic_mngr.c b/test/validation/api/traffic_mngr/traffic_mngr.c
index db6a16af..9b9e73b7 100644
--- a/test/validation/api/traffic_mngr/traffic_mngr.c
+++ b/test/validation/api/traffic_mngr/traffic_mngr.c
@@ -3070,6 +3070,7 @@ static int test_byte_wred(const char *wred_name,
odp_tm_queue_t tm_queue;
pkt_info_t pkt_info;
uint32_t num_fill_pkts, num_test_pkts, pkts_sent;
+ int ret;
/* Pick the tm_queue and set the tm_queue's wred profile to drop the
* given percentage of traffic, then send 100 pkts and see how many
@@ -3131,13 +3132,13 @@ static int test_byte_wred(const char *wred_name,
flush_leftover_pkts(odp_tm_systems[0], rcv_pktin);
CU_ASSERT(odp_tm_is_idle(odp_tm_systems[0]));
- if ((wred_pkt_cnts->min_cnt <= pkts_sent) &&
- (pkts_sent <= wred_pkt_cnts->max_cnt))
- return 0;
-
- CU_ASSERT((wred_pkt_cnts->min_cnt <= pkts_sent) &&
- (pkts_sent <= wred_pkt_cnts->max_cnt));
- return 0;
+ ret = !((wred_pkt_cnts->min_cnt <= pkts_sent) &&
+ (pkts_sent <= wred_pkt_cnts->max_cnt));
+ if (ret)
+ LOG_DBG("min %" PRIu32 " pkts %" PRIu32" max %" PRIu32 "\n",
+ wred_pkt_cnts->min_cnt, pkts_sent,
+ wred_pkt_cnts->max_cnt);
+ return odp_cunit_ret(ret);
}
static int test_pkt_wred(const char *wred_name,
-----------------------------------------------------------------------
Summary of changes:
test/validation/api/traffic_mngr/traffic_mngr.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 0ebd57ab0ea8e1a95cdb8a564fcaec4cad6231e7 (commit)
from a7c60d702466bc0f9de64993446e8ec39a16de88 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0ebd57ab0ea8e1a95cdb8a564fcaec4cad6231e7
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Mon Jun 25 11:18:51 2018 +0300
linux-gen: use common posix extensions header
Use odp_posix_extensions.h inside ODP implementation to ensure that
(when extensions are used) the same level of POSIX extensions is
used everywhere.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index abd9cffc..a89c5a2b 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -7,10 +7,8 @@
*/
#include "config.h"
+#include <odp_posix_extensions.h>
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <stdint.h>
#include <string.h>
#include <malloc.h>
diff --git a/platform/linux-generic/pktio/ethtool_rss.c b/platform/linux-generic/pktio/ethtool_rss.c
index e1ba33aa..1ad9c970 100644
--- a/platform/linux-generic/pktio/ethtool_rss.c
+++ b/platform/linux-generic/pktio/ethtool_rss.c
@@ -5,10 +5,7 @@
*/
#include "config.h"
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
+#include <odp_posix_extensions.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/platform/linux-generic/pktio/socket_common.c b/platform/linux-generic/pktio/socket_common.c
index edb4bcf3..f5bf9e00 100644
--- a/platform/linux-generic/pktio/socket_common.c
+++ b/platform/linux-generic/pktio/socket_common.c
@@ -4,10 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "config.h"
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
+#include <odp_posix_extensions.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/platform/linux-generic/pktio/stats/ethtool_stats.c b/platform/linux-generic/pktio/stats/ethtool_stats.c
index fc04fd31..bfc2a60c 100644
--- a/platform/linux-generic/pktio/stats/ethtool_stats.c
+++ b/platform/linux-generic/pktio/stats/ethtool_stats.c
@@ -5,10 +5,8 @@
*/
#include "config.h"
+#include <odp_posix_extensions.h>
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <linux/sockios.h>
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_traffic_mngr.c | 4 +---
platform/linux-generic/pktio/ethtool_rss.c | 5 +----
platform/linux-generic/pktio/socket_common.c | 5 +----
platform/linux-generic/pktio/stats/ethtool_stats.c | 4 +---
4 files changed, 4 insertions(+), 14 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via dd7bcc7dead9bceba895ad877ad3ac7642d4e717 (commit)
from 7c33f29d51082d693c0653df84cb13f2b946eec8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dd7bcc7dead9bceba895ad877ad3ac7642d4e717
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Thu Jun 21 14:01:25 2018 +0300
.travis.yml: upgrade DPDK to 17.11.3 -- latest stable release
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/.travis.yml b/.travis.yml
index 886e40f0..3dca855c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -49,7 +49,7 @@ env:
# for individual commit validation. But you you want to track tests history
# you need generated new one at https://codecov.io specific for your repo.
- CODECOV_TOKEN=a733c34c-5f5c-4ff1-af4b-e9f5edb1ab5e
- - DPDK_VERS="17.11.2"
+ - DPDK_VERS="17.11.3"
matrix:
- CONF=""
- CONF="--disable-abi-compat"
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 9ab55a834226a8ae9faea3491f23aa065303cb41 (commit)
via 4e99631dda78212103dc7d6bc9b165f89079e60e (commit)
via 3565cdd101fae3d0ed5aacde80b7d49d8c4c4af8 (commit)
from 719ac4509920bad7d5c8d563426d21f2a0c9e80e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9ab55a834226a8ae9faea3491f23aa065303cb41
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Fri Jun 15 15:00:11 2018 +0300
configure: m4: simplify pthread detection
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
deleted file mode 100644
index c78b87de..00000000
--- a/m4/ax_pthread.m4
+++ /dev/null
@@ -1,332 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads. It
-# sets the PTHREAD_LIBS output variable to the threads library and linker
-# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-# flags that are needed. (The user can also force certain compiler
-# flags/libs to be tested by setting these environment variables.)
-#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well. e.g. you should link with
-# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-# If you are only building threads programs, you may wish to use these
-# variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-# PTHREAD_CFLAGS.
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads library
-# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-# is not found. If ACTION-IF-FOUND is not specified, the default action
-# will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or if
-# you have any other suggestions or comments. This macro was based on work
-# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-# Alejandro Forero Cuervo to the autoconf macro repository. We are also
-# grateful for the helpful feedback of numerous users.
-#
-# Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj(a)alum.mit.edu>
-# Copyright (c) 2011 Daniel Richard G. <skunk(a)iSKUNK.ORG>
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 21
-
-AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-AC_DEFUN([AX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_PUSH([C])
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
- AC_MSG_RESULT([$ax_pthread_ok])
- if test x"$ax_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case ${host_os} in
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
- ;;
-
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
-esac
-
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
-
-AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
- [AC_MSG_RESULT([yes])],
- [ax_pthread_extra_flags=
- AC_MSG_RESULT([no])])
-CFLAGS="$save_CFLAGS"
-
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
- static void routine(void *a) { if(a) a = 0; }
- static void *start_routine(void *a) { return a; }],
- [pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */])],
- [ax_pthread_ok=yes],
- [])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT([$ax_pthread_ok])
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
- [int attr = $attr; return attr /* ; */])],
- [attr_name=$attr; break],
- [])
- done
- AC_MSG_RESULT([$attr_name])
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- # TODO: What about Clang on Solaris?
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- AC_MSG_RESULT([$flag])
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
- [ax_cv_PTHREAD_PRIO_INHERIT], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
- [[int i = PTHREAD_PRIO_INHERIT;]])],
- [ax_cv_PTHREAD_PRIO_INHERIT=yes],
- [ax_cv_PTHREAD_PRIO_INHERIT=no])
- ])
- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
- [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != xyes; then
- case $host_os in
- aix*)
- AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
- [#handle absolute path differently from PATH based program lookup
- AS_CASE(["x$CC"],
- [x/*],
- [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
- [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
-AC_SUBST([PTHREAD_CC])
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
- ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
- :
-else
- ax_pthread_ok=no
- $2
-fi
-AC_LANG_POP
-])dnl AX_PTHREAD
diff --git a/m4/odp_pthread.m4 b/m4/odp_pthread.m4
index f2654ac4..0e3485e3 100644
--- a/m4/odp_pthread.m4
+++ b/m4/odp_pthread.m4
@@ -1,7 +1,24 @@
+# Copyright (c) 2018, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
# ODP_PTHREAD
# -----------
# Check for pthreads availability
-AC_DEFUN([ODP_PTHREAD], [dnl
-AX_PTHREAD([CC="$PTHREAD_CC"],
- [AC_MSG_FAILURE([We require pthreads to be available])])
+AC_DEFUN([ODP_PTHREAD], [
+ AC_MSG_CHECKING([for pthread support in -pthread])
+ AC_LANG_PUSH([C])
+ PTHEAD_CFLAGS="-pthread"
+ CFLAGS="$CFLAGS $PTHEAD_CFLAGS"
+ PTHEAD_LIBS="-pthread"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+ AC_TRY_LINK_FUNC([pthread_create], [pthread=yes])
+ if test x"$pthread" != "xyes"; then
+ AC_MSG_FAILURE([pthread is not supported])
+ fi
+ AC_MSG_RESULT([yes])
+ AC_LANG_POP([C])
])
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
commit 4e99631dda78212103dc7d6bc9b165f89079e60e
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Jun 14 16:49:33 2018 +0300
configure: do not use GPL AX_CHECK_COMPILE_FLAG
remove dependency of GPL AX_CHECK_COMPILE_FLAG macro.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
deleted file mode 100644
index ca363971..00000000
--- a/m4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the current language's compiler
-# or gives an error. (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the current language's default
-# flags (e.g. CFLAGS) when the check is done. The check is thus made with
-# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
-# force the compiler to issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim <guidod(a)gmx.de>
-# Copyright (c) 2011 Maarten Bosmans <mkbosmans(a)gmail.com>
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 4
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
- ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
- AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/odp_check_flag.m4 b/m4/odp_check_flag.m4
index 827f9f01..37667d4e 100644
--- a/m4/odp_check_flag.m4
+++ b/m4/odp_check_flag.m4
@@ -1,3 +1,9 @@
+# Copyright (c) 2018, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
dnl Use -Werror in the checks below since Clang emits a warning instead of
dnl an error when it encounters an unknown warning option.
@@ -5,22 +11,28 @@ dnl an error when it encounters an unknown warning option.
# ---------------------
# Add FLAG to ODP_CFLAGS if compiler supports that option
AC_DEFUN([ODP_CHECK_CFLAG],
- [AC_LANG_PUSH([C])
- AX_CHECK_COMPILE_FLAG([$1],
- [ODP_CFLAGS="$ODP_CFLAGS $1"],
- [], [-W -Wall -Werror],
- [AC_LANG_SOURCE([int main(void)
- {return 0;}])])
+[
+ AC_MSG_CHECKING([if $CC supports $1])
+ AC_LANG_PUSH([C])
+ saved_cflags="$CFLAGS"
+ CFLAGS="-W -Wall -Werror $ODP_CFLAGS $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])
+ ODP_CFLAGS="$ODP_CFLAGS $1"],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="$saved_cflags"
AC_LANG_POP([C])])
# ODP_CHECK_CXXFLAG(FLAG)
# ---------------------
-# Add FLAG to ODP_CFLAGS if compiler supports that option
AC_DEFUN([ODP_CHECK_CXXFLAG],
- [AC_LANG_PUSH([C++])
- AX_CHECK_COMPILE_FLAG([$1],
- [ODP_CXXFLAGS="$ODP_CXXFLAGS $1"],
- [], [-W -Wall -Werror],
- [AC_LANG_SOURCE([int main(void)
- {return 0;}])])
+[ AC_MSG_CHECKING([if $CXX supports $1])
+ AC_LANG_PUSH([C++])
+ saved_cxxflags="$CXXFLAGS"
+ CXXFLAGS="-W -Wall -Werror $ODP_CXXFLAGS $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])
+ ODP_CXXFLAGS="$ODP_CXXFLAGS $1"],
+ [AC_MSG_RESULT([no])])
+ CXXFLAGS="$saved_cxxflags"
AC_LANG_POP([C++])])
commit 3565cdd101fae3d0ed5aacde80b7d49d8c4c4af8
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Jun 14 16:41:23 2018 +0300
configure: do check of -mcx16 more simple
do not use GPL ax_compiler_vendor.m4 from autotools
inside out project.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
diff --git a/configure.ac b/configure.ac
index f13525de..d52c419d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,17 +81,6 @@ AC_TYPE_INT32_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
-#########################################################################
-# Get GCC version
-#########################################################################
-
-AX_COMPILER_VERSION
-CC_VERSION=$ax_cv_c_compiler_version
-
-CC_VERSION_MAJOR=$(echo $CC_VERSION | cut -d'.' -f1)
-CC_VERSION_MINOR=$(echo $CC_VERSION | cut -d'.' -f2)
-CC_VERSION_PATCH=$(echo $CC_VERSION | cut -d'.' -f3)
-
##########################################################################
# Default warning setup
##########################################################################
@@ -122,13 +111,7 @@ ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
##########################################################################
# Check if compiler supports cmpxchng16 on x86-based architectures
##########################################################################
-case "${host}" in
- i?86* | x86*)
- if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
- ODP_CHECK_CFLAG([-mcx16])
- fi
- ;;
-esac
+ODP_CHECK_CFLAG([-mcx16])
##########################################################################
# Allow valgrind suite to run against the defined tests
@@ -377,6 +360,8 @@ AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
AC_SUBST([EXEEXT])
+CC_VERSION=$($CC --version | head -n 1)
+
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4
deleted file mode 100644
index 39ca3c0f..00000000
--- a/m4/ax_compiler_vendor.m4
+++ /dev/null
@@ -1,87 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_COMPILER_VENDOR
-#
-# DESCRIPTION
-#
-# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-# watcom, etc. The vendor is returned in the cache variable
-# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj(a)alum.mit.edu>
-# Copyright (c) 2008 Matteo Frigo
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 15
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
- dnl Please add if possible support to ax_compiler_version.m4
- [# note: don't check for gcc first since some other compilers define __GNUC__
- vendors="intel: __ICC,__ECC,__INTEL_COMPILER
- ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__
- pathscale: __PATHCC__,__PATHSCALE__
- clang: __clang__
- cray: _CRAYC
- fujitsu: __FUJITSU
- gnu: __GNUC__
- sun: __SUNPRO_C,__SUNPRO_CC
- hp: __HP_cc,__HP_aCC
- dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
- borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
- comeau: __COMO__
- kai: __KCC
- lcc: __LCC__
- sgi: __sgi,sgi
- microsoft: _MSC_VER
- metrowerks: __MWERKS__
- watcom: __WATCOMC__
- portland: __PGI
- tcc: __TINYC__
- unknown: UNKNOWN"
- for ventest in $vendors; do
- case $ventest in
- *:) vendor=$ventest; continue ;;
- *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
- esac
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
- #if !($vencpp)
- thisisanerror;
- #endif
- ])], [break])
- done
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
- ])
-])
diff --git a/m4/ax_compiler_version.m4 b/m4/ax_compiler_version.m4
deleted file mode 100644
index 0863118c..00000000
--- a/m4/ax_compiler_version.m4
+++ /dev/null
@@ -1,492 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_version.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_COMPILER_VERSION
-#
-# DESCRIPTION
-#
-# This macro retrieves the compiler version and returns it in the cache
-# variable $ax_cv_c_compiler_version for C and $ax_cv_cxx_compiler_version
-# for C++.
-#
-# Version is returned as epoch:major.minor.patchversion
-#
-# Epoch is used in order to have an increasing version number in case of
-# marketing change.
-#
-# Epoch use: * borland compiler use chronologically 0turboc for turboc
-# era,
-#
-# 1borlanc BORLANC++ before 5, 2cppbuilder for cppbuilder era,
-# 3borlancpp for return of BORLANC++ (after version 5.5),
-# 4cppbuilder for cppbuilder with year version,
-# and 5xe for XE era.
-#
-# An empty string is returned otherwise.
-#
-# LICENSE
-#
-# Copyright (c) 2014 Bastien ROUCARIES <roucaries.bastien+autoconf(a)gmail.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 4
-
-# for intel
-AC_DEFUN([_AX_COMPILER_VERSION_INTEL],
- [ dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [__INTEL_COMPILER/100],,
- AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [(__INTEL_COMPILER%100)/10],,
- AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [(__INTEL_COMPILER%10)],,
- AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# for IBM
-AC_DEFUN([_AX_COMPILER_VERSION_IBM],
- [ dnl
- dnl check between z/OS C/C++ and XL C/C++
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([],
- [
- #if defined(__COMPILER_VER__)
- choke me;
- #endif
- ])],
- [
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [__xlC__/100],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [__xlC__%100],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__xlC_ver__/0x100],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
- [__xlC_ver__%0x100],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler build version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
- ],
- [
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__xlC__%1000],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [(__xlC__/10000)%10],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [(__xlC__/100000)%10],,
- AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-])
-
-# for pathscale
-AC_DEFUN([_AX_COMPILER_VERSION_PATHSCALE],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- __PATHCC__,,
- AC_MSG_FAILURE([[[$0]] unknown pathscale major]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- __PATHCC_MINOR__,,
- AC_MSG_FAILURE([[[$0]] unknown pathscale minor]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__PATHCC_PATCHLEVEL__],,
- AC_MSG_FAILURE([[[$0]] unknown pathscale patch level]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# for clang
-AC_DEFUN([_AX_COMPILER_VERSION_CLANG],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- __clang_major__,,
- AC_MSG_FAILURE([[[$0]] unknown clang major]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- __clang_minor__,,
- AC_MSG_FAILURE([[[$0]] unknown clang minor]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__clang_patchlevel__],,0)
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# for crayc
-AC_DEFUN([_AX_COMPILER_VERSION_CRAY],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- _RELEASE,,
- AC_MSG_FAILURE([[[$0]] unknown crayc release]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- _RELEASE_MINOR,,
- AC_MSG_FAILURE([[[$0]] unknown crayc minor]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
- ])
-
-# for fujitsu
-AC_DEFUN([_AX_COMPILER_VERSION_FUJITSU],[
- AC_COMPUTE_INT(ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
- __FCC_VERSION,,
- AC_MSG_FAILURE([[[$0]]unknown fujitsu release]))
- ])
-
-# for GNU
-AC_DEFUN([_AX_COMPILER_VERSION_GNU],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- __GNUC__,,
- AC_MSG_FAILURE([[[$0]] unknown gcc major]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- __GNUC_MINOR__,,
- AC_MSG_FAILURE([[[$0]] unknown gcc minor]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__GNUC_PATCHLEVEL__],,
- AC_MSG_FAILURE([[[$0]] unknown gcc patch level]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# For sun
-AC_DEFUN([_AX_COMPILER_VERSION_SUN],[
- m4_define([_AX_COMPILER_VERSION_SUN_NUMBER],
- [
- #if defined(__SUNPRO_CC)
- __SUNPRO_CC
- #else
- __SUNPRO_C
- #endif
- ])
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59,
- !!(_AX_COMPILER_VERSION_SUN_NUMBER < 0x1000),,
- AC_MSG_FAILURE([[[$0]] unknown sun release version]))
- AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59" = X1],
- [dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
- AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- (_AX_COMPILER_VERSION_SUN_NUMBER / 0x10) % 0x10,,
- AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100),,
- AC_MSG_FAILURE([[[$0]] unknown sun major version]))
- ],
- [dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
- AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100) % 0x100,,
- AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (_AX_COMPILER_VERSION_SUN_NUMBER / 0x1000),,
- AC_MSG_FAILURE([[[$0]] unknown sun major version]))
- ])
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-])
-
-AC_DEFUN([_AX_COMPILER_VERSION_HP],[
- m4_define([_AX_COMPILER_VERSION_HP_NUMBER],
- [
- #if defined(__HP_cc)
- __HP_cc
- #else
- __HP_aCC
- #endif
- ])
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121,
- !!(_AX_COMPILER_VERSION_HP_NUMBER <= 1),,
- AC_MSG_FAILURE([[[$0]] unknown hp release version]))
- AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121" = X1],
- [dnl By default output last version with this behavior.
- dnl it is so old
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="01.21.00"
- ],
- [dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- (_AX_COMPILER_VERSION_HP_NUMBER % 100),,
- AC_MSG_FAILURE([[[$0]] unknown hp release version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- ((_AX_COMPILER_VERSION_HP_NUMBER / 100)%100),,
- AC_MSG_FAILURE([[[$0]] unknown hp minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- ((_AX_COMPILER_VERSION_HP_NUMBER / 10000)%100),,
- AC_MSG_FAILURE([[[$0]] unknown hp major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-])
-
-AC_DEFUN([_AX_COMPILER_VERSION_DEC],[dnl
- m4_define([_AX_COMPILER_VERSION_DEC_NUMBER],
- [
- #if defined(__DECC_VER)
- __DECC_VER
- #else
- __DECCXX_VER
- #endif
- ])
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- (_AX_COMPILER_VERSION_DEC_NUMBER % 10000),,
- AC_MSG_FAILURE([[[$0]] unknown dec release version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- ((_AX_COMPILER_VERSION_DEC_NUMBER / 100000UL)%100),,
- AC_MSG_FAILURE([[[$0]] unknown dec minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- ((_AX_COMPILER_VERSION_DEC_NUMBER / 10000000UL)%100),,
- AC_MSG_FAILURE([[[$0]] unknown dec major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# borland
-AC_DEFUN([_AX_COMPILER_VERSION_BORLAND],[dnl
- m4_define([_AX_COMPILER_VERSION_TURBOC_NUMBER],
- [
- #if defined(__TURBOC__)
- __TURBOC__
- #else
- choke me
- #endif
- ])
- m4_define([_AX_COMPILER_VERSION_BORLANDC_NUMBER],
- [
- #if defined(__BORLANDC__)
- __BORLANDC__
- #else
- __CODEGEARC__
- #endif
- ])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(,
- _AX_COMPILER_VERSION_TURBOC_NUMBER)],
- [dnl TURBOC
- AC_COMPUTE_INT(
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw,
- _AX_COMPILER_VERSION_TURBOC_NUMBER,,
- AC_MSG_FAILURE([[[$0]] unknown turboc version]))
- AS_IF(
- [test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -lt 661 || test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -gt 1023],
- [dnl compute normal version
- AC_COMPUTE_INT(
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- _AX_COMPILER_VERSION_TURBOC_NUMBER % 0x100,,
- AC_MSG_FAILURE([[[$0]] unknown turboc minor version]))
- AC_COMPUTE_INT(
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (_AX_COMPILER_VERSION_TURBOC_NUMBER/0x100)%0x100,,
- AC_MSG_FAILURE([[[$0]] unknown turboc major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"],
- [dnl special version
- AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw],
- [661],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.00"],
- [662],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.01"],
- [663],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:2.00"],
- [
- AC_MSG_WARN([[[$0]] unknown turboc version between 0x295 and 0x400 please report bug])
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""
- ])
- ])
- ],
- # borlandc
- [
- AC_COMPUTE_INT(
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw,
- _AX_COMPILER_VERSION_BORLANDC_NUMBER,,
- AC_MSG_FAILURE([[[$0]] unknown borlandc version]))
- AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw],
- dnl BORLANC++ before 5.5
- [512] ,[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:2.00"],
- [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
- [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
- [1040],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.1"],
- [1106],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:4.0"],
- [1280],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.0"],
- [1312],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.02"],
- dnl C++ Builder era
- [1328],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:3.0"],
- [1344],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:4.0"],
- dnl BORLANC++ after 5.5
- [1360],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.5"],
- [1361],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.51"],
- [1378],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.6.4"],
- dnl C++ Builder with year number
- [1392],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2006"],
- [1424],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2007"],
- [1555],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2009"],
- [1569],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2010"],
- dnl XE version
- [1584],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe"],
- [1600],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:2"],
- [1616],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:3"],
- [1632],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:4"],
- [
- AC_MSG_WARN([[[$0]] Unknown borlanc compiler version $_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw please report bug])
- ])
- ])
- ])
-
-# COMO
-AC_DEFUN([_AX_COMPILER_VERSION_COMEAU],
- [ dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [__COMO_VERSION__%100],,
- AC_MSG_FAILURE([[[$0]] unknown comeau compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [(__COMO_VERSION__/100)%10],,
- AC_MSG_FAILURE([[[$0]] unknown comeau compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
- ])
-
-# KAI
-AC_DEFUN([_AX_COMPILER_VERSION_KAI],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__KCC_VERSION%100],,
- AC_MSG_FAILURE([[[$0]] unknown kay compiler patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [(__KCC_VERSION/100)%10],,
- AC_MSG_FAILURE([[[$0]] unknown kay compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [(__KCC_VERSION/1000)%10],,
- AC_MSG_FAILURE([[[$0]] unknown kay compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-dnl LCC
-dnl LCC does not output version...
-
-# SGI
-AC_DEFUN([_AX_COMPILER_VERSION_SGI],[
- m4_define([_AX_COMPILER_VERSION_SGI_NUMBER],
- [
- #if defined(_COMPILER_VERSION)
- _COMPILER_VERSION
- #else
- _SGI_COMPILER_VERSION
- #endif
- ])
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [_AX_COMPILER_VERSION_SGI_NUMBER%10],,
- AC_MSG_FAILURE([[[$0]] unknown SGI compiler patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- [(_AX_COMPILER_VERSION_SGI_NUMBER/10)%10],,
- AC_MSG_FAILURE([[[$0]] unknown SGI compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- [(_AX_COMPILER_VERSION_SGI_NUMBER/100)%10],,
- AC_MSG_FAILURE([[[$0]] unknown SGI compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# microsoft
-AC_DEFUN([_AX_COMPILER_VERSION_MICROSOFT],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- _MSC_VER%100,,
- AC_MSG_FAILURE([[[$0]] unknown microsoft compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (_MSC_VER/100)%100,,
- AC_MSG_FAILURE([[[$0]] unknown microsoft compiler major version]))
- dnl could be overridden
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_build=0
- # special case for version 6
- AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X12"],
- [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- _MSC_FULL_VER%1000,,
- _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0)])
- # for version 7
- AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X13"],
- [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- _MSC_FULL_VER%1000,,
- AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
- ])
- # for version > 8
- AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 14],
- [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- _MSC_FULL_VER%10000,,
- AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
- ])
- AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 15],
- [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
- _MSC_BUILD,,
- AC_MSG_FAILURE([[[$0]] unknown microsoft compiler build version]))
- ])
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
- ])
-
-# for metrowerks
-AC_DEFUN([_AX_COMPILER_VERSION_METROWERKS],[dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- __MWERKS__%0x100,,
- AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler patch version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- (__MWERKS__/0x100)%0x10,,
- AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (__MWERKS__/0x1000)%0x10,,
- AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# for watcom
-AC_DEFUN([_AX_COMPILER_VERSION_WATCOM],[dnl
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- __WATCOMC__%100,,
- AC_MSG_FAILURE([[[$0]] unknown watcom compiler minor version]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- (__WATCOMC__/100)%100,,
- AC_MSG_FAILURE([[[$0]] unknown watcom compiler major version]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
- ])
-
-# for PGI
-AC_DEFUN([_AX_COMPILER_VERSION_PORTLAND],[
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
- __PGIC__,,
- AC_MSG_FAILURE([[[$0]] unknown pgi major]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
- __PGIC_MINOR__,,
- AC_MSG_FAILURE([[[$0]] unknown pgi minor]))
- AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
- [__PGIC_PATCHLEVEL__],,
- AC_MSG_FAILURE([[[$0]] unknown pgi patch level]))
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
- ])
-
-# tcc
-AC_DEFUN([_AX_COMPILER_VERSION_TCC],[
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=[`tcc -v | $SED 's/^[ ]*tcc[ ]\+version[ ]\+\([0-9.]\+\).*/\1/g'`]
- ])
-# main entry point
-AC_DEFUN([AX_COMPILER_VERSION],[dnl
- AC_REQUIRE([AX_COMPILER_VENDOR])
- AC_REQUIRE([AC_PROG_SED])
- AC_CACHE_CHECK([for _AC_LANG compiler version],
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
- [ dnl
- AS_CASE([$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor],
- [intel],[_AX_COMPILER_VERSION_INTEL],
- [ibm],[_AX_COMPILER_VERSION_IBM],
- [pathscale],[_AX_COMPILER_VERSION_PATHSCALE],
- [clang],[_AX_COMPILER_VERSION_CLANG],
- [cray],[_AX_COMPILER_VERSION_CRAY],
- [fujitsu],[_AX_COMPILER_VERSION_FUJITSU],
- [gnu],[_AX_COMPILER_VERSION_GNU],
- [sun],[_AX_COMPILER_VERSION_SUN],
- [hp],[_AX_COMPILER_VERSION_HP],
- [dec],[_AX_COMPILER_VERSION_DEC],
- [borland],[_AX_COMPILER_VERSION_BORLAND],
- [comeau],[_AX_COMPILER_VERSION_COMEAU],
- [kai],[_AX_COMPILER_VERSION_KAI],
- [sgi],[_AX_COMPILER_VERSION_SGI],
- [microsoft],[_AX_COMPILER_VERSION_MICROSOFT],
- [metrowerks],[_AX_COMPILER_VERSION_METROWERKS],
- [watcom],[_AX_COMPILER_VERSION_WATCOM],
- [portland],[_AX_COMPILER_VERSION_PORTLAND],
- [tcc],[_AX_COMPILER_VERSION_TCC],
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""])
- ])
-])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 21 +-
m4/ax_check_compile_flag.m4 | 74 -------
m4/ax_compiler_vendor.m4 | 87 --------
m4/ax_compiler_version.m4 | 492 --------------------------------------------
m4/ax_pthread.m4 | 332 ------------------------------
m4/odp_check_flag.m4 | 38 ++--
m4/odp_pthread.m4 | 23 ++-
7 files changed, 48 insertions(+), 1019 deletions(-)
delete mode 100644 m4/ax_check_compile_flag.m4
delete mode 100644 m4/ax_compiler_vendor.m4
delete mode 100644 m4/ax_compiler_version.m4
delete mode 100644 m4/ax_pthread.m4
hooks/post-receive
--