summaryrefslogtreecommitdiff
path: root/configure.in
blob: 84d5571f562f63ca841b30ff831933077699bd9f (plain)
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
AC_INIT(configure.in)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(ext4magic, 0.2.0-pv0)

AC_LANG_C
AC_PROG_CC
AM_PROG_LIBTOOL

fail=0
AC_CHECK_HEADER([ext2fs/ext2fs.h],[],[fail=1])
AC_CHECK_HEADER([blkid/blkid.h],[],[fail=1])
AC_CHECK_HEADER([e2p/e2p.h],[],[fail=1])
AC_CHECK_HEADER([uuid/uuid.h],[],[fail=1])
test $fail = 1 &&
AC_MSG_ERROR([You must install the develop packages "ext2fs , blkid , e2p , uuid" to build ext4magic])

if pkg-config --exists 'ext2fs < 1.41.9' ; then
AC_MSG_ERROR([You must have ext2fs version >= 1.41.9 to build ext4magic])
fi

fail=0
AC_SEARCH_LIBS([magic_buffer], [magic], [], [fail=1])
test $fail = 1 &&
AC_MSG_ERROR([The library libmagic.so not found, install the package "file" to build ext4magic])



AC_ARG_ENABLE(debug,[  --enable-debug            Turn on debugging ],
         [if test "$GCC" = "yes"; then CPPFLAGS="$CPPFLAGS -DDEBUG"; fi])
AC_ARG_ENABLE(debug-magic,[  --enable-debug-magic            Turn on debugging magic-scan-engine ],
         [if test "$GCC" = "yes"; then CPPFLAGS="$CPPFLAGS -DDEBUG_MAGIC_SCAN"; fi])
AC_ARG_ENABLE(file-attr,[  --enable-file-attr            enable restore of file attribute ],
         [if test "$GCC" = "yes"; then CPPFLAGS="$CPPFLAGS -DFILE_ATTR"; fi])

AC_OUTPUT(Makefile src/Makefile)