summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-15 15:45:33 -0800
committerJosh Blum <josh@joshknows.com>2010-01-15 15:45:33 -0800
commit92c76e574773e99d1bfb5c3a833217b8644779f4 (patch)
tree12c80f9acf1c9ac489eddaedb13861e0ab9674b0 /configure.ac
parent3b47904f24169904bf65b29091d85ddfc2a7edb4 (diff)
downloaduhd-92c76e574773e99d1bfb5c3a833217b8644779f4.tar.gz
uhd-92c76e574773e99d1bfb5c3a833217b8644779f4.tar.bz2
uhd-92c76e574773e99d1bfb5c3a833217b8644779f4.zip
Dboard base class that is no longer also the xcvr.
The xcvr base inherits from this (as does rx and tx base). Added m4 macro to check for compiler flags. The configure checks flags and headers. Merged the register subdev static methods into one method that associates a dboard id with a dboard constructor. The manager code is responsible for checking this association and creating the correct subdev instances.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e36fce8ef..acb77f90c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,10 +14,32 @@ AM_INIT_AUTOMAKE(usrp_uhd, 0)
##################################################
AC_PROG_CXX
LT_INIT
-AX_BOOST_BASE([1.36])
+AX_BOOST_BASE([1.36], [], AC_MSG_ERROR("cannot find boost"))
AX_BOOST_THREAD
##################################################
+## Check Headers
+##################################################
+AC_DEFUN([UHD_CHECK_HEADER],[
+ AC_CHECK_HEADER([$1], [], AC_MSG_ERROR("cannot find header $1"))
+])
+UHD_CHECK_HEADER([sys/uio.h])
+UHD_CHECK_HEADER([arpa/inet.h])
+UHD_CHECK_HEADER([netinet/ether.h])
+
+##################################################
+## Check Flags
+##################################################
+AC_DEFUN([UHD_OPTIONAL_CXXFLAG],[
+ AX_CXX_CHECK_FLAG([$1], [], [], [CXXFLAGS="${CXXFLAGS} $1"])
+])
+UHD_OPTIONAL_CXXFLAG([-Wall])
+UHD_OPTIONAL_CXXFLAG([-Wextra])
+UHD_OPTIONAL_CXXFLAG([-Werror])
+UHD_OPTIONAL_CXXFLAG([-pedantic])
+UHD_OPTIONAL_CXXFLAG([-ansi])
+
+##################################################
## Check Programs
##################################################
AC_PATH_PROG(SED, sed)