File: configure.ac

package info (click to toggle)
sleuthkit 4.1.3-3~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,800 kB
  • sloc: ansic: 147,143; sh: 40,085; cpp: 36,823; java: 6,886; makefile: 1,248; xml: 529; python: 409; perl: 59; sed: 16
file content (194 lines) | stat: -rw-r--r-- 6,055 bytes parent folder | download | duplicates (5)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.59])

AC_INIT(sleuthkitframework, 4.0.0)
AC_CONFIG_SRCDIR([tsk/framework/framework.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([foreign])
AM_PROG_LIBTOOL
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_LANG([C++])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP

# Check for OS
AC_CANONICAL_HOST
AM_CONDITIONAL([DARWIN],false)
case $host_os in
    darwin*)
        # Mac
        AM_CONDITIONAL([DARWIN],true)
        ;;
    linux*)
        # Linux
        # nothing special to do for now
        ;;
    *)
        # Default Case
        AC_MSG_ERROR([Your platform is not currently supported])
        ;;
esac

# Not all compilers include /usr/local in the include and link path
if test -e /usr/local/include; then
    CFLAGS="$CFLAGS -I/usr/local/include"
    LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
# AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset strtoul strtoull])

# Check for methods in library and check for header files
AC_CHECK_HEADERS([Poco/Foundation.h Poco/Net/HTTPCookie.h Poco/DOM/Entity.h Poco/Util/Timer.h],[],AC_MSG_ERROR([Poco include files not found.]))

AC_CHECK_LIB([PocoFoundation],[main],[HAVE_POCOFOUNDATION=1],AC_MSG_ERROR([PocoFoundation library not found.]))
if test "$HAVE_POCOFOUNDATION"; then
    save_libs="${LIBS}"
    LIBS="-lPocoFoundation"
    AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
            [#include "Poco/UnicodeConverter.h"],
            [std::wstring wstr; Poco::UnicodeConverter::toUTF16("hello", wstr);]
        )],
        [LIBS="$LIBS $save_libs"],
        [AC_MSG_ERROR([linking with PocoFoundation failed.])]
    )
fi

AC_CHECK_LIB([PocoUtil],[main],[HAVE_POCOUTIL=1],AC_MSG_ERROR([PocoUtil library not found.]))
if test "$HAVE_POCOUTIL"; then
    save_libs="${LIBS}"
    LIBS="-lPocoUtil"
    AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
            [#include "Poco/Util/Option.h"],
            [Poco::Util::Option();]
        )],
        [LIBS="$LIBS $save_libs"],
        [AC_MSG_ERROR([linking with PocoUtil failed.])]
    )
fi

AC_CHECK_LIB([PocoXML],[main],[HAVE_POCOXML=1],AC_MSG_ERROR([PocoXML library not found.]))
if test "$HAVE_POCOXML"; then
    save_libs="${LIBS}"
    LIBS="-lPocoXML"
    AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
            [#include "Poco/DOM/DOMParser.h"],
            [Poco::XML::DOMParser().parse("http://www.google.com");]
        )],
        [LIBS="$LIBS $save_libs"],
        [AC_MSG_ERROR([linking with PocoXML failed.])]
    )
fi

AC_CHECK_LIB([PocoNet],[main],[HAVE_POCONET=1],AC_MSG_ERROR([PocoNet library not found.]))
if test "$HAVE_POCONET"; then
    save_libs="${LIBS}"
    LIBS="-lPocoNet"
    AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
            [#include "Poco/Net/HTTPClientSession.h"],
            [Poco::Net::HTTPClientSession();]
        )],
        [LIBS="$LIBS $save_libs"],
        [AC_MSG_ERROR([linking with PocoNET failed.])]
    )
fi

AC_CHECK_LIB([PocoZip],[main],[HAVE_POCOZIP=1],AC_MSG_ERROR([PocoZip library not found.]))
if test "$HAVE_POCOZIP"; then
    save_libs="${LIBS}"
    LIBS="-lPocoZip"
    AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
            [#include "Poco/Zip/ZipArchive.h"],
            [Poco::Zip::ZipArchive::FileHeaders::const_iterator fh;]
        )],
        [LIBS="$LIBS $save_libs"],
        [AC_MSG_ERROR([linking with PocoZip failed.])]
    )
fi

# Standard values for modules in the modules folder
AC_SUBST(AM_CXXFLAGS_MOD, "-I../.. -I../../.. -Wall")
AC_SUBST(AM_LIBADD_MOD, "../../tsk/framework/libtskframework.la ../../../tsk/libtsk.la")

# REMOVE THESE
AC_SUBST(TSK_INCLUDE, "-I../../..")
AC_SUBST(FW_INCLUDE,  "-I../..")
AC_SUBST(FW_LIBS, "../../tsk/framework/libtskframework.la ../../../tsk/libtsk.la")

# RUNTIME_MODULES_CONFIG_DIR
AC_SUBST(RUNTIME_MODULES_CONFIG_DIR, "../../runtime/modules_config")

# MODULES_ROOT_DIR is the tsk/framework/modules directory
# MODULES_ROOT_DIR is relative to RUNTIME_MODULES_CONFIG_DIR/<module_name>
# so that each module can do the following to populate config files to the runtime directory.
#   mkdir -p $(RUNTIME_MODULES_CONFIG_DIR)/<module_name>
#   (cd $(RUNTIME_MODULES_CONFIG_DIR)/<module_name>; ln -s $(MODULES_ROOT_DIR)/c_foobarModule/foobar_config.xml .)
AC_SUBST(MODULES_ROOT_DIR, "../../../modules")

[rm -f modules/*/missing_libs.txt]
for i in `ls modules/`
do
  if test -d "modules/${i}"; then
    case ${i} in
      c_FileTypeSigModule)          AC_CONFIG_SUBDIRS([modules/c_FileTypeSigModule]) ;;
      c_LibExifModule)              AC_CONFIG_SUBDIRS([modules/c_LibExifModule]) ;;
# NOTE: There is a small amount of code in the ZIP configure.ac to list out
# all modules that missed dependencies.  If one gets added after it, then 
# besure to move that code to that module so that it is shown at the end
# of a "./configure" run
    esac
  fi
done

AC_CONFIG_FILES([Makefile
        tsk/framework/Makefile
        tsk/framework/extraction/Makefile
        tsk/framework/file/Makefile
        tsk/framework/pipeline/Makefile
        tsk/framework/services/Makefile
        tsk/framework/utilities/Makefile
        modules/Makefile
        modules/c_EntropyModule/Makefile
        modules/c_HashCalcModule/Makefile
        modules/c_InterestingFilesModule/Makefile
        modules/c_RegRipperModule/Makefile
        modules/c_SaveInterestingFilesModule/Makefile
        modules/c_SummaryReportModule/Makefile
        modules/c_TskHashLookupModule/Makefile
        modules/c_ZIPExtractionModule/Makefile
        tools/Makefile
        tools/tsk_analyzeimg/Makefile
        tools/tsk_validatepipeline/Makefile
])

AC_OUTPUT