aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-02 17:29:59 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-02 17:29:59 +0200
commitdcef7ddfced0ff2a1ea013b30db7022bb55b2b07 (patch)
tree45c454ebaef7c2c279f47cec0581d929146cb2fe /configure.ac
parent8823ffb8e0cd34615f44e5d241030c57a7465153 (diff)
downloadetisnoop-dcef7ddfced0ff2a1ea013b30db7022bb55b2b07.tar.gz
etisnoop-dcef7ddfced0ff2a1ea013b30db7022bb55b2b07.tar.bz2
etisnoop-dcef7ddfced0ff2a1ea013b30db7022bb55b2b07.zip
Replace CMake by autotools
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 48 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..c35909b
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,48 @@
+dnl -*- Autoconf -*-
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT([etisnoop], [1.0.0], [http://opendigitalradio.org/])
+AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([-Wall tar-ustar foreign subdir-objects])
+AM_SILENT_RULES([yes])
+AC_CONFIG_HEADER([config.h])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MKDIR_P
+
+AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
+
+# std::thread requires pthread
+AX_PTHREAD( [
+ AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
+ CLIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
+ CC="$PTHREAD_CC"], [AC_MSG_ERROR([requires pthread])] )
+
+AC_CHECK_LIB([m], [sin])
+
+AC_SEARCH_LIBS([init_rs_char], [fec], [], [
+ AC_MSG_ERROR([unable to find libfec])
+])
+
+AC_SEARCH_LIBS([NeAACDecDecode], [faad], [], [
+ AC_MSG_ERROR([unable to find libfaad])
+])
+
+AC_CHECK_LIB([rt], [clock_gettime], [], [AC_MSG_ERROR([library rt is missing])])
+
+AM_CONDITIONAL([IS_GIT_REPO], [test -d '.git'])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+echo
+echo "***********************************************"
+echo " Configured etisnoop"
+echo " Please run make"
+echo