-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfigure.ac
More file actions
executable file
·195 lines (175 loc) · 5.08 KB
/
configure.ac
File metadata and controls
executable file
·195 lines (175 loc) · 5.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
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
195
AC_INIT(fuse, 2.9.0)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
LT_INIT
m4_pattern_allow([AC_PROG_LIBTOOL])
m4_pattern_allow([AM_ICONV])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
AM_CONFIG_HEADER(include/config.h)
AC_PROG_LIBTOOL
AC_PROG_CC
AM_PROG_CC_C_O
# compatibility for automake < 1.8
if test -z "$mkdir_p"; then
mkdir_p="../mkinstalldirs"
AC_SUBST(mkdir_p)
fi
case $target_os in
*linux*) arch=linux;;
*netbsd*) arch=netbsd;;
*bsd*) arch=bsd;;
*) arch=unknown;;
esac
if test "$ac_env_CFLAGS_set" != set; then
CFLAGS="-Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing"
fi
AC_ARG_ENABLE(lib,
[ --enable-lib Compile with library ])
AC_ARG_ENABLE(util,
[ --enable-util Compile with util ])
AC_ARG_ENABLE(src,
[ --enable-src Compile with src ])
AC_ARG_ENABLE(mtab,
[ --disable-mtab Disable and ignore usage of /etc/mtab ])
AC_ARG_WITH(pkgconfigdir,
[ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
[pkgconfigdir=$withval],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST(pkgconfigdir)
subdirs2="include"
if test "$enable_lib" != "no"; then
subdirs2="$subdirs2 lib";
fi
if test "$arch" = linux -a "$enable_util" != "no"; then
subdirs2="$subdirs2 util";
fi
if test "$enable_src" != "no"; then
subdirs2="$subdirs2 src";
fi
if test "$enable_mtab" = "no"; then
AC_DEFINE(IGNORE_MTAB, 1, [Don\'t update /etc/mtab])
fi
AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimespec])
libfuse_libs="-pthread"
LIBS=
AC_SEARCH_LIBS(dlopen, [dl])
AC_SEARCH_LIBS(clock_gettime, [rt])
libfuse_libs="$libfuse_libs $LIBS"
LIBS=
AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
done
])
AM_ICONV
libfuse_libs="$libfuse_libs $LTLIBICONV"
AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes)
AC_SUBST(libfuse_libs)
## Stuff suggested by autoscan
AC_CHECK_FUNCS([clock_gettime])
AC_CHECK_FUNCS([dup2])
AC_CHECK_FUNCS([ftruncate])
AC_CHECK_FUNCS([getcwd])
AC_CHECK_FUNCS([getmntent])
AC_CHECK_FUNCS([getpagesize])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([lchown])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([mkdir])
AC_CHECK_FUNCS([mkfifo])
AC_CHECK_FUNCS([munmap])
AC_CHECK_FUNCS([nl_langinfo])
AC_CHECK_FUNCS([realpath])
AC_CHECK_FUNCS([rmdir])
AC_CHECK_FUNCS([setenv])
AC_CHECK_FUNCS([setlocale])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strdup])
AC_CHECK_FUNCS([strerror])
AC_CHECK_FUNCS([strrchr])
AC_CHECK_FUNCS([strstr])
AC_CHECK_FUNCS([strtol])
AC_CHECK_FUNCS([strtoul])
AC_CHECK_FUNCS([uname])
AC_CHECK_FUNCS([utime])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([langinfo.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([locale.h])
AC_CHECK_HEADERS([mntent.h])
AC_CHECK_HEADERS([paths.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([sys/mount.h])
AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([sys/statfs.h])
AC_CHECK_HEADERS([sys/statvfs.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([utime.h])
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_C_INLINE
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_GETMNTENT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_PROG_CXX
AC_PROG_RANLIB
AC_STRUCT_ST_BLOCKS
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UID_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
## End stuff suggested by autoscan
if test -z "$MOUNT_FUSE_PATH"; then
MOUNT_FUSE_PATH=/sbin
fi
AC_SUBST(MOUNT_FUSE_PATH)
if test -z "$UDEV_RULES_PATH"; then
UDEV_RULES_PATH=/etc/udev/rules.d
fi
AC_SUBST(UDEV_RULES_PATH)
if test -z "$INIT_D_PATH"; then
INIT_D_PATH=/etc/init.d
fi
AC_SUBST(INIT_D_PATH)
AC_SUBST(subdirs2)
AM_CONDITIONAL(LINUX, test "$arch" = linux)
AM_CONDITIONAL(NETBSD, test "$arch" = netbsd)
AM_CONDITIONAL(BSD, test "$arch" = bsd)
util_linux_ok=yes
if test "$arch" = linux -a "$cross_compiling" != "yes"; then
AC_MSG_CHECKING([if umount supports --fake --no-canonicalize])
# exit code of umount is 1 if option is unrecognised, 2 otherwise
umount --fake --no-canonicalize > /dev/null 2>&1
if test $? != 1; then
AC_MSG_RESULT([yes])
else
firstline=`umount --fake --no-canonicalize 2>&1 | head -1`
AC_MSG_RESULT([$firstline])
util_linux_ok=no
fi
fi
AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile src/Makefile include/Makefile])
AC_OUTPUT
if test "$util_linux_ok" = no; then
AC_MSG_WARN([
******************************************************************
* Please install util-linux version 2.18 or later which supports *
* --fake and --no-canonicalize options in mount and umount *
******************************************************************])
fi