diff options
author | Alexander Huemer <alexander.huemer@xx.vu> | 2018-01-21 01:30:14 +0100 |
---|---|---|
committer | Alexander Huemer <alexander.huemer@xx.vu> | 2018-01-21 01:30:14 +0100 |
commit | ec6adccbbdda1a4614089aaf52f9e1bab75494e7 (patch) | |
tree | b154bc254c99bc1ef89790a32437870becdcf19d /configure.ac | |
parent | d73669241539988387db8d758fb306dfe8974836 (diff) |
Extract libusrp, adjust to be buildable standalone
* $ git \
filter-branch \
--prune-empty \
--tree-filter \
'find \! -path "./usrp/*" -a -type f -delete' \
HEAD
* Craft custom configure.ac
* Update m4 macros
* Small fixes here and there
The code in doc/, firmware/ and host/swig does _not_ build at the
moment, due to m4 macros not being adhered and is disabled therefore.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f923786 --- /dev/null +++ b/configure.ac @@ -0,0 +1,95 @@ +AC_INIT([libusrp], [3.4.2]) +AM_INIT_AUTOMAKE([foreign subdir-objects silent-rules]) +AM_SILENT_RULES([yes]) + +AC_CONFIG_MACRO_DIRS([m4]) + +AC_PROG_CXX + +LT_INIT([pic-only disable-static]) + +PKG_CHECK_MODULES([USB], [libusb-1.0]) + +AX_BOOST_BASE([1.37], [true], [AC_MSG_ERROR([boost is required, bailing out])]) + +AX_BOOST_THREAD +CXXFLAGS="$CXXFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar +CFLAGS="$CFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar + +dnl +dnl all the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo> +dnl +AX_BOOST_DATE_TIME +AX_BOOST_FILESYSTEM +dnl AX_BOOST_IOSTREAMS +AX_BOOST_PROGRAM_OPTIONS +dnl AX_BOOST_REGEX +dnl AX_BOOST_SERIALIZATION +dnl AX_BOOST_SIGNALS +AX_BOOST_SYSTEM +dnl AX_BOOST_TEST_EXEC_MONITOR +dnl AX_BOOST_UNIT_TEST_FRAMEWORK +dnl AX_BOOST_WSERIALIZATION + +# Allow user to choose whether to generate SWIG/Python +# Default is enabled +AC_ARG_ENABLE([python], + [AS_HELP_STRING([--enable-python], + [generate SWIG/Python components (default is yes)])], + [case "${enableval}" in + yes) enable_python=yes ;; + no) enable_python=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;; + esac], + [enable_python=no] +) + +# Allow user to choose whether to generate SWIG/Guile +# Default is disabled +AC_ARG_ENABLE([guile], + [AS_HELP_STRING([--enable-guile], + [generate SWIG/Guile components (default is no)])], + [case "${enableval}" in + yes) enable_guile=yes ;; + no) enable_guile=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-guile]) ;; + esac], + [enable_guile=no] +) + +AM_PATH_PYTHON + +AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes]) +AM_CONDITIONAL([GUILE], [test x$enable_guile = xyes]) + +AC_CHECK_PROG([XMLTO],[xmlto],[yes],[]) +AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes]) + +AC_CONFIG_FILES([ + Makefile + usrp.pc + usrp.iss + doc/Doxyfile + doc/Makefile + doc/other/Makefile + host/Makefile + host/include/Makefile + host/include/usrp/Makefile + host/include/usrp/libusb_types.h + host/misc/Makefile + host/lib/Makefile + host/lib/std_paths.h + host/swig/Makefile + host/apps/Makefile + firmware/Makefile + firmware/include/Makefile + firmware/lib/Makefile + firmware/src/Makefile + firmware/src/common/Makefile + firmware/src/usrp2/Makefile + fpga/Makefile + fpga/rbf/Makefile + fpga/rbf/rev2/Makefile + fpga/rbf/rev4/Makefile +]) +AC_OUTPUT |