-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
65 lines (56 loc) · 1.88 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This file is part of the Lightweight Universal Network Analyzer (LUNA)
#
# Copyright (c) 2013 Fiona Klute
#
# LUNA 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.
#
# LUNA 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 LUNA. If not, see <http://www.gnu.org/licenses/>.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([luna], [0.1], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/luna.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC_C99
AC_PROG_INSTALL
# Checks for libraries.
AC_GNU_SOURCE
# realtime stuff
LIBRT=""
AC_CHECK_LIB(rt, clock_getres, [LIBRT="-lrt"])
AC_SUBST(LIBRT)
# libgsl
PKG_CHECK_MODULES(LIBGSL, gsl >= 1.15)
AC_SUBST(LIBGSL_LIBS)
AC_SUBST(LIBGSL_CFLAGS)
# enable pthreads
ACX_PTHREAD
LIBS="$LIBS $PTHREAD_LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h signal.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_ARG_ENABLE(kutime,
[ --enable-kutime Record user space times when receiving packages],
[AC_DEFINE([ENABLE_KUTIME], [1], [Test])], [])
AC_ARG_ENABLE(capabilities,
[ --enable-capabilities Set file capabilities for LUNA binary
during installation],
[AC_SUBST([SET_CAPS], [true])], AC_SUBST([SET_CAPS], [false]))
# Stuff to build
AC_CONFIG_FILES([Makefile src/Makefile evaluation/Makefile \
remote-control/Makefile])
AC_OUTPUT