-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
93 lines (74 loc) · 2.08 KB
/
configure.ac
File metadata and controls
93 lines (74 loc) · 2.08 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.62)
AC_INIT([daq_pcap_spooler], [0.4], [beenph@gmail.com])
AM_INIT_AUTOMAKE([daq], [0.4])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([daq_pcap_spooler.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Enable visibility if we can
AC_ENABLE_VISIBILITY()
# Special compiler flags for ICC, etc.
AC_SF_COMPILER_SETUP()
# Checks for the DAQ API headers and the SFBPF headers/library.
AC_CHECK_DAQ_API
AC_CHECK_SFBPF
# Checks for other dependencies of your DAQ module go here.
AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta])
# Couldn't really find a better way to do this.
AC_DEFUN([AC_CHECK_DAQ_API_VER],
[
AC_MSG_CHECKING([DAQ_API_VERSION])
AC_RUN_IFELSE([
AC_LANG_SOURCE(
[[
#include <daq_api.h>
int main()
{
#ifdef DAQ_API_VERSION
if(DAQ_API_VERSION == $1)
{
return 0;
}
#endif
return 1;
}]])],
[
AC_MSG_RESULT([DAQ_API_VERSION installed is ($1) OK ])
],
[
AC_MSG_RESULT([DAQ_API_VERSION installed is not ($1) ERROR ])
exit 1;
])
])
AC_CHECK_DAQ_API_VER([0x00010002])
# Large file support
AC_ARG_ENABLE(largefile,
[ --enable-largefile Enable largefile support (default:no)],
[enable_largefile="yes"], [enable_largefile="no"])
if test "x$enable_largefile" == "xyes"; then
CPPFLAGS="${CPPFLAGS} -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64"
AC_TYPE_INT64_T
AC_CHECK_FUNCS([lseek64 fstat64])
AC_DEFINE([LARGEFILE_SUPPORT],[1],[We support large file])
else
AC_CHECK_FUNCS([lseek fstat])
fi
# Checks for header files.
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT8_T
AC_TYPE_UINT32_T
# Checks for library functions.
#break compile on some system
#AC_FUNC_MALLOC
#break compile on some system
AC_CHECK_FUNCS([memset strchr strdup strerror strtol])
# Substitutions
# Output
AC_CONFIG_FILES([Makefile])
AC_OUTPUT