aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-03-02 12:43:47 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-04-13 19:03:56 +0200
commite4403464ed7de23f8fa3a2a57acee31248993c3d (patch)
tree81d9c4223a384745b3f215933cabf60a1de389a1 /configure.ac
parent7a21dccec1c672e0c071eb5f264a26c248ac6cac (diff)
octphy: add conditional compilation to support latest octasic header release
With octasics latest release (octsdr-2g-02.07.01-B1351-beta), some struct members are moved or renamed. This patch adds ifdef-logic and configure checks to restore compatibilty. Change-Id: I73287983e8bed8bf64b2ab87e6b810c2c59ea6fd
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 37 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 001e10e4..cbfbf125 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,10 +72,46 @@ AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes")
if test "$enable_octphy" = "yes" ; then
oldCPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS"
+
AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[],
[AC_MSG_ERROR([octphy/octvc1/gsm/octvc1_gsm_default.h can not be found in $octsdr2g_incdir])],
[#include <octphy/octvc1/gsm/octvc1_gsm_default.h>])
- AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], AC_DEFINE([OCTPHY_MULTI_TRX], [1], [Define to 1 if your octphy header files support multi-trx]), [], [#include <octphy/octvc1/gsm/octvc1_gsm_api.h>])
+
+ AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn],
+ AC_DEFINE([OCTPHY_MULTI_TRX],
+ [1],
+ [Define to 1 if your octphy header files support multi-trx]),
+ [],
+ [#include <octphy/octvc1/gsm/octvc1_gsm_api.h>])
+
+ AC_CHECK_MEMBER([tOCTVC1_HW_RF_PORT_RX_STATS.Frequency],
+ AC_DEFINE([OCTPHY_USE_FREQUENCY],
+ [1],
+ [Define to 1 if your octphy header files support tOCTVC1_RADIO_FREQUENCY_VALUE type]),
+ [],
+ [#include <octphy/octvc1/hw/octvc1_hw_api.h>])
+
+ AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulSyncLossCnt],
+ AC_DEFINE([OCTPHY_USE_SYNC_LOSS_CNT],
+ [1],
+ [Define to 1 if your octphy header files renamed ulSyncLosseCnt to ulSyncLossCnt]),
+ [],
+ [#include <octphy/octvc1/hw/octvc1_hw_api.h>])
+
+ AC_CHECK_MEMBER([tOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_TX_CONFIG_RSP.TxConfig],
+ AC_DEFINE([OCTPHY_USE_TX_CONFIG],
+ [1],
+ [Define to 1 if your octphy header files support tOCTVC1_HW_RF_PORT_ANTENNA_TX_CONFIG type]),
+ [],
+ [#include <octphy/octvc1/hw/octvc1_hw_api.h>])
+
+ AC_CHECK_MEMBER([tOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_RX_CONFIG_RSP.RxConfig],
+ AC_DEFINE([OCTPHY_USE_RX_CONFIG],
+ [1],
+ [Define to 1 if your octphy header files support tOCTVC1_HW_RF_PORT_ANTENNA_RX_CONFIG type]),
+ [],
+ [#include <octphy/octvc1/hw/octvc1_hw_api.h>])
+
CPPFLAGS=$oldCPPFLAGS
fi