-
Notifications
You must be signed in to change notification settings - Fork 21
/
configure.ac
61 lines (46 loc) · 1.9 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
# Process this file with autoconf to produce a configure script
AC_INIT([archivemount],[0.9.1], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AM_PROG_CC_C_O
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile archivemount.1])
RELEASE_DATE="20 April 2020"
AC_SUBST(RELEASE_DATE)
# Check for libfuse
PKG_CHECK_EXISTS(fuse)
PKG_CHECK_MODULES([FUSE], [fuse >= 2.6],,
AC_MSG_ERROR([libfuse>=2.6 not found.
If libfuse is installed then perhaps you should set
the PKG_CONFIG_PATH=/dir/containing/fuse.pc environment
variable]))
AC_SUBST([FUSE_LIBS])
AC_SUBST([FUSE_CFLAGS])
# Check for libarchive (no pkg-config support)
AC_CHECK_LIB([archive], [archive_read_new], [ARCHIVE_LIBS=-larchive],
AC_MSG_ERROR([libarchive not found.
If libarchive is installed then perhaps you should set
the LDFLAGS=-L/nonstandard/lib/dir environment variable]))
AC_SUBST([ARCHIVE_LIBS])
AC_CHECK_HEADERS([archive.h archive_entry.h],,
AC_MSG_ERROR([libarchive headers not found.
If the libarchive headers are installed then perhaps you
should set the CPPFLAGS=-I/nonstandard/include/dir
environment variable]))
AC_CHECK_HEADERS([regex.h],,
AC_MSG_ERROR([regex.h not found.
If the regex.h header file is installed then perhaps you
should set the CPPFLAGS=-I/nonstandard/include/dir
environment variable]))
# Debug support
AC_MSG_CHECKING(if you want debug support)
debug_on=no
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
[enable debug support (def=no)]),
debug_on="$enableval")
AC_MSG_RESULT($debug_on)
if test "$debug_on" = "no"; then
AC_DEFINE([NDEBUG],, [Define to drop debug support])
fi
AM_CONDITIONAL(DEBUG, test "$debug_on" = yes)
AC_OUTPUT