summaryrefslogtreecommitdiff
path: root/configure.ac (plain)
blob: 830c5fb6db6d048318378becfe9e8fce70cf9472
1#
2# configure.ac - Source file to generate "./configure" to prepare package for
3# compilation.
4#
5# Copyright (c) 2000-2013 Anton Altaparmakov
6# Copyright (c) 2003 Jan Kratochvil
7# Copyright (c) 2005-2009 Szabolcs Szakacsits
8# Copyright (C) 2007-2008 Alon Bar-Lev
9#
10# This program/include file is free software; you can redistribute it and/or
11# modify it under the terms of the GNU General Public License as published
12# by the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# This program/include file is distributed in the hope that it will be
16# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program (in the main directory of the NTFS-3G
22# distribution in the file COPYING); if not, write to the Free Software
23# Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
25# Autoconf
26AC_PREREQ(2.59)
27AC_INIT([ntfs-3g],[2014.2.15],[ntfs-3g-devel@lists.sf.net])
28LIBNTFS_3G_VERSION="85"
29AC_CONFIG_SRCDIR([src/ntfs-3g.c])
30
31# Environment
32AC_CANONICAL_HOST
33AC_CANONICAL_TARGET
34
35# Automake
36AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
37AC_CONFIG_HEADERS([config.h])
38AC_CONFIG_MACRO_DIR([m4])
39AM_MAINTAINER_MODE
40
41# Options
42AC_ARG_ENABLE(
43 [debug],
44 [AS_HELP_STRING([--enable-debug],[enable debugging code and output])],
45 ,
46 [enable_debug="no"]
47)
48
49AC_ARG_ENABLE(
50 [warnings],
51 [AS_HELP_STRING([--enable-warnings],[enable lots of compiler warnings])],
52 ,
53 [enable_warnings="no"]
54)
55
56AC_ARG_ENABLE(
57 [pedantic],
58 [AS_HELP_STRING([--enable-pedantic],[enable compile pedantic mode])],
59 ,
60 [enable_pedantic="no"]
61)
62
63AC_ARG_ENABLE(
64 [really-static],
65 [AS_HELP_STRING([--enable-really-static],[create fully static binaries])],
66 ,
67 [enable_really_static="no"]
68)
69
70AC_ARG_ENABLE(
71 [mount-helper],
72 [AS_HELP_STRING([--enable-mount-helper],[install mount helper @<:@default=enabled for linux@:>@])],
73 ,
74 [
75 case "${target_os}" in
76 linux*) enable_mount_helper="yes" ;;
77 *) enable_mount_helper="no" ;;
78 esac
79 ]
80)
81
82AC_ARG_ENABLE(
83 [ldscript],
84 [AS_HELP_STRING([--enable-ldscript],[use ldscript instead of .so symlink])],
85 ,
86 [enable_ldscript="no"]
87)
88
89AC_ARG_ENABLE(
90 [ldconfig],
91 [AS_HELP_STRING([--disable-ldconfig],[do not update dynamic linker cache using ldconfig])],
92 ,
93 [enable_ldconfig="yes"]
94)
95
96AC_ARG_ENABLE(
97 [library],
98 [AS_HELP_STRING([--disable-library],[do not install libntfs-3g but link it into ntfs-3g])],
99 ,
100 [enable_library="yes"]
101)
102
103AC_ARG_ENABLE(
104 [mtab],
105 [AS_HELP_STRING([--disable-mtab],[disable and ignore usage of /etc/mtab])],
106 ,
107 [enable_mtab="yes"]
108)
109
110AC_ARG_ENABLE(
111 [posix-acls],
112 [AS_HELP_STRING([--enable-posix-acls],[enable POSIX ACL support])],
113 ,
114 [enable_posix_acls="no"]
115)
116
117AC_ARG_ENABLE(
118 [xattr-mappings],
119 [AS_HELP_STRING([--enable-xattr-mappings],[enable system extended attributes mappings])],
120 ,
121 [enable_xattr_mappings="no"]
122)
123
124AC_ARG_ENABLE(
125 [device-default-io-ops],
126 [AS_HELP_STRING([--disable-device-default-io-ops],[install default IO ops])],
127 ,
128 [enable_device_default_io_ops="yes"]
129)
130
131AC_ARG_ENABLE(
132 [ntfs-3g],
133 [AS_HELP_STRING([--disable-ntfs-3g],[disable the ntfs-3g FUSE driver])],
134 ,
135 [enable_ntfs_3g="yes"]
136)
137
138AC_ARG_ENABLE(
139 [ntfsprogs],
140 [AS_HELP_STRING([--disable-ntfsprogs],[disable ntfsprogs utilities
141 (default=no)])],
142 ,
143 [enable_ntfsprogs="yes"]
144)
145
146AC_ARG_ENABLE(crypto,
147 AS_HELP_STRING(--enable-crypto,enable crypto related code and utilities
148 (default=no)), ,
149 enable_crypto=no
150)
151
152AC_ARG_ENABLE(
153 [extras],
154 [AS_HELP_STRING([--enable-extras],[enable extra ntfsprogs utilities
155 (default=no)])],
156 ,
157 [enable_extras="no"]
158)
159
160AC_ARG_ENABLE(
161 [nfconv],
162 [AS_HELP_STRING([--disable-nfconv],[disable the 'nfconv' patch, which adds support for Unicode normalization form conversion when built on Mac OS X @<:@default=enabled for Mac OS X@:>@])],
163 [enable_nfconv="no"],
164 [
165 case "${target_os}" in
166 darwin*) enable_nfconv="yes" ;;
167 *) enable_nfconv="no" ;;
168 esac
169 ]
170)
171
172# pthread_rwlock_t requires _GNU_SOURCE
173AC_GNU_SOURCE
174
175# Programs
176AC_PROG_CC(gcc cc)
177AC_PROG_LN_S
178AM_PROG_CC_C_O
179
180ifdef(
181 [LT_INIT],
182 [LT_INIT],
183 [AC_PROG_LIBTOOL]
184)
185
186AC_PROG_INSTALL
187PKG_PROG_PKG_CONFIG
188
189AC_PATH_PROG([MV], [mv])
190AC_PATH_PROG([RM], [rm])
191AC_PATH_PROG([SED], [sed])
192AC_ARG_VAR([LDCONFIG], [ldconfig utility])
193AC_PATH_PROG([LDCONFIG], [ldconfig], [true], [/sbin /usr/sbin $PATH])
194
195# Environment
196AC_MSG_CHECKING([Windows OS])
197case "${target}" in
198*-mingw32*|*-winnt*|*-cygwin*)
199 AC_MSG_RESULT([yes])
200 WINDOWS="yes"
201 AC_DEFINE(
202 [WINDOWS],
203 [1],
204 [Define to 1 if this is a Windows OS]
205 )
206 ;;
207*)
208 AC_MSG_RESULT([no])
209 WINDOWS="no"
210 ;;
211esac
212
213if test "x${enable_ntfs_3g}" = "xyes"; then
214 AC_MSG_CHECKING([fuse compatibility])
215 case "${target_os}" in
216 linux*|solaris*)
217 AC_ARG_WITH(
218 [fuse],
219 [AS_HELP_STRING([--with-fuse=<internal|external>],[Select FUSE library: internal or external @<:@default=internal@:>@])],
220 ,
221 [with_fuse="internal"]
222 )
223 ;;
224 darwin*|netbsd*|kfreebsd*-gnu)
225 with_fuse="external"
226 ;;
227 freebsd*)
228 AC_MSG_ERROR([Please see FreeBSD support at http://www.freshports.org/sysutils/fusefs-ntfs])
229 ;;
230 *)
231 AC_MSG_ERROR([ntfs-3g can be built for Linux, FreeBSD, Mac OS X, NetBSD, and Solaris only.])
232 ;;
233 esac
234 AC_MSG_RESULT([${with_fuse}])
235else
236 with_fuse="none"
237fi
238
239case "${target_os}" in
240solaris*)
241 if test "x$GCC" != "xyes" ; then
242 AC_MSG_ERROR([ntfs-3g can be built only with gcc on Solaris. Install it by 'pkg install gcc-dev' and retry.)])
243 fi
244 ;;
245esac
246
247if test "${enable_ldscript}" = "yes"; then
248 AC_MSG_CHECKING([Output format])
249 OUTPUT_FORMAT="$(${CC} ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | ${SED} -n 's/^OUTPUT_FORMAT("\([[^"]]*\)",.*/\1/p')"
250 if test -z "${OUTPUT_FORMAT}"; then
251 AC_MSG_RESULT([None])
252 else
253 AC_MSG_RESULT([${OUTPUT_FORMAT}])
254 OUTPUT_FORMAT="OUTPUT_FORMAT ( ${OUTPUT_FORMAT} )"
255 fi
256fi
257
258# Libraries
259if test "${with_fuse}" = "internal"; then
260 AC_CHECK_LIB(
261 [pthread],
262 [pthread_create],
263 [LIBFUSE_LITE_LIBS="${LIBFUSE_LITE_LIBS} -lpthread"],
264 [AC_MSG_ERROR([Cannot find pthread library])]
265 )
266 AC_DEFINE(
267 [_REENTRANT],
268 [1],
269 [Required define if using POSIX threads]
270 )
271 # required so that we re-compile anything
272 AC_DEFINE(
273 [FUSE_INTERNAL],
274 [1],
275 [Define to 1 if using internal fuse]
276 )
277
278 AC_MSG_CHECKING([Solaris OS])
279 AC_LANG_PUSH([C])
280 AC_COMPILE_IFELSE(
281 [
282 AC_LANG_SOURCE(
283 [[#if !((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))]]
284 [[#error "Not a Solaris system."]]
285 [[#endif]]
286 )
287 ],
288 [
289 AC_MSG_RESULT([yes])
290 LIBFUSE_LITE_CFLAGS="${LIBFUSE_LITE_CFLAGS} -std=c99 -D__SOLARIS__ -D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
291 LIBFUSE_LITE_LIBS="${LIBFUSE_LITE_LIBS} -lxnet"
292 ],
293 [
294 AC_MSG_RESULT([no])
295 ]
296 )
297 AC_LANG_POP([C])
298elif test "${with_fuse}" = "external"; then
299 if test -z "$PKG_CONFIG"; then
300 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
301 fi
302 test "x${PKG_CONFIG}" = "xno" && AC_MSG_ERROR([pkg-config wasn't found! Please install from your vendor, or see http://pkg-config.freedesktop.org/wiki/])
303 # Libraries often install their metadata .pc files in directories
304 # not searched by pkg-config. Let's workaround this.
305 export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/lib/pkgconfig:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:$prefix/lib/pkgconfig:/opt/gnome/share/pkgconfig:/usr/local/share/pkgconfig
306 PKG_CHECK_MODULES(
307 [FUSE_MODULE],
308 [fuse >= 2.6.0],
309 ,
310 [
311 AC_MSG_ERROR([FUSE >= 2.6.0 was not found. Either older FUSE is still present, or FUSE is not fully installed (e.g. fuse, libfuse, libfuse2, libfuse-dev, etc packages). Source code: http://fuse.sf.net])
312 ]
313 )
314 FUSE_LIB_PATH=`$PKG_CONFIG --libs-only-L fuse | sed -e 's,/[/]*,/,g' -e 's,[ ]*$,,'`
315fi
316
317# Autodetect whether we can build crypto stuff or not.
318compile_crypto=false
319if test "$enable_crypto" != "no"; then
320 have_libgcrypt=false
321 AM_PATH_LIBGCRYPT(1.2.2, [ have_libgcrypt=true ],
322 [
323 if test "$enable_crypto" = "yes"; then
324 AC_MSG_ERROR([ntfsprogs crypto code requires the gcrypt library.])
325 else
326 AC_MSG_WARN([ntfsprogs crypto code requires the gcrypt library.])
327 fi
328 ])
329 have_libgnutls=false
330 PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.4, [ have_libgnutls=true ],
331 if test "$enable_crypto" = "yes"; then
332 AC_MSG_ERROR([ntfsprogs crypto code requires the gnutls library.])
333 else
334 AC_MSG_WARN([ntfsprogs crypto code requires the gnutls library.])
335 fi
336 )
337 if test "$have_libgcrypt" = "true"; then
338 if test "$have_libgnutls" = "true"; then
339 compile_crypto=true
340 AC_DEFINE([ENABLE_CRYPTO], 1,
341 [Define this to 1 if you want to enable support of
342 encrypted files in libntfs and utilities.])
343 fi
344 fi
345fi
346AM_CONDITIONAL(ENABLE_CRYPTO, $compile_crypto)
347
348# add --with-extra-includes and --with-extra-libs switch to ./configure
349all_libraries="$all_libraries $USER_LDFLAGS"
350all_includes="$all_includes $USER_INCLUDES"
351AC_SUBST(all_includes)
352AC_SUBST(all_libraries)
353
354# Specify support for generating DCE compliant UUIDs (aka GUIDs). We check if
355# uuid/uuid.h header is present and the uuid library is present that goes with
356# it and then check if uuid_generate() is present and usable.
357#
358# DCE UUIDs are enabled by default and can be disabled with the --disable-uuid
359# option to the configure script.
360AC_ARG_WITH(uuid, [
361 --with-uuid@<:@=PFX@:>@ generate DCE compliant UUIDs, with optional prefix
362 to uuid library and headers @<:@default=detect@:>@
363 --without-uuid do not generate DCE compliant UUIDs],
364 if test "$with_uuid" = "yes"; then
365 extrapath=default
366 elif test "$with_uuid" = "no"; then
367 extrapath=
368 else
369 extrapath=$with_uuid
370 fi,
371 extrapath=default
372)
373if test "x$extrapath" != "x"; then
374 if test "x$extrapath" != "xdefault"; then
375 MKNTFS_CPPFLAGS="$MKNTFS_CPPFLAGS -I$extrapath/include"
376 MKNTFS_LIBS="$MKNTFS_LIBS -L$extrapath/lib"
377 fi
378
379 search_for_luuid="yes"
380 AC_CHECK_HEADER([uuid/uuid.h],
381 [],
382 [
383 AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
384 search_for_luuid="no"
385 ],
386 )
387
388 if test "x$search_for_luuid" != "xno"; then
389 # Look for uuid_generate in the standard C library.
390 AC_CHECK_FUNC([uuid_generate],
391 [
392 AC_DEFINE([ENABLE_UUID], 1,
393 [Define this to 1 if you want to enable
394 generation of DCE compliant UUIDs.])
395 search_for_luuid="no"
396 ],
397 [],
398 )
399 fi
400
401 if test "x$search_for_luuid" != "xno"; then
402 # Look for uuid_generate in the 'uuid' library.
403 AC_CHECK_LIB([uuid], [uuid_generate],
404 [
405 AC_DEFINE([ENABLE_UUID], 1,
406 [Define this to 1 if you want to enable
407 generation of DCE compliant UUIDs.])
408 MKNTFS_LIBS="$MKNTFS_LIBS -luuid"
409 search_for_luuid="no"
410 ],
411 [],
412 )
413 fi
414
415 if test "x$search_for_luuid" != "xno"; then
416 AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
417 fi
418fi
419
420# Specify support for obtaining the correct BIOS legacy geometry needed for
421# Windows to boot in CHS mode. We check if hd.h header is present and the hd
422# library is present that goes with it and then check if the hd_list() function
423# is present and usable.
424#
425# Using the hd library is enabled by default and can be disabled with the
426# --disable-hd option to the configure script.
427AC_ARG_WITH(hd, [
428 --with-hd@<:@=PFX@:>@ use Windows compliant disk geometry, with optional
429 prefix to hd library and headers @<:@default=detect@:>@
430 --without-hd do not use Windows compliant disk geometry],
431 if test "$with_hd" = "yes"; then
432 extrapath2=default
433 elif test "$with_hd" = "no"; then
434 extrapath2=
435 else
436 extrapath2=$with_hd
437 fi,
438 extrapath2=default
439)
440if test "x$extrapath2" != "x"; then
441 if test "x$extrapath2" != "xdefault"; then
442 LIBNTFS_CPPFLAGS="$LIBNTFS_CPPFLAGS -I$extrapath2/include"
443 LIBNTFS_LIBS="$LIBNTFS_LIBS -L$extrapath2/lib"
444 fi
445 AC_CHECK_HEADER([hd.h],
446 AC_CHECK_LIB([hd], [hd_list],
447 AC_DEFINE([ENABLE_HD], 1,
448 [Define this to 1 if you want to enable use of Windows
449 compliant disk geometry.])
450 LIBNTFS_LIBS="$LIBNTFS_LIBS -lhd"
451 NTFSPROGS_STATIC_LIBS="$NTFSPROGS_STATIC_LIBS -lhd",
452 AC_MSG_WARN([ntfsprogs Windows compliant geometry code requires the hd library.]),
453 ),
454 AC_MSG_WARN([ntfsprogs Windows compliant geometry code requires the hd library.]),
455 )
456fi
457
458# Checks for header files.
459AC_HEADER_STDC
460AC_CHECK_HEADERS([ctype.h fcntl.h libgen.h libintl.h limits.h locale.h \
461 mntent.h stddef.h stdint.h stdlib.h stdio.h stdarg.h string.h \
462 strings.h errno.h time.h unistd.h utime.h wchar.h getopt.h features.h \
463 regex.h endian.h byteswap.h sys/byteorder.h sys/disk.h sys/endian.h \
464 sys/param.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/stat.h sys/types.h \
465 sys/vfs.h sys/statvfs.h sys/sysmacros.h linux/major.h linux/fd.h \
466 linux/hdreg.h machine/endian.h windows.h syslog.h pwd.h malloc.h])
467
468# Checks for typedefs, structures, and compiler characteristics.
469AC_HEADER_STDBOOL
470AC_C_BIGENDIAN(
471 ,
472 [
473 AC_DEFINE(
474 [WORDS_LITTLEENDIAN],
475 [1],
476 [Define to 1 if your processor stores words with the least significant
477 byte first (like Intel and VAX, unlike Motorola and SPARC).]
478 )
479 ]
480 ,
481)
482AC_C_CONST
483AC_C_INLINE
484AC_TYPE_OFF_T
485AC_TYPE_SIZE_T
486AC_STRUCT_ST_BLOCKS
487AC_CHECK_MEMBERS([struct stat.st_rdev])
488AC_CHECK_MEMBERS([struct stat.st_atim])
489AC_CHECK_MEMBERS([struct stat.st_atimespec])
490AC_CHECK_MEMBERS([struct stat.st_atimensec])
491
492# For the 'nfconv' patch (Mac OS X only):
493case "${target_os}" in
494darwin*)
495 if test "${enable_nfconv}" = "yes"; then
496 AC_CHECK_HEADER(
497 [CoreFoundation/CoreFoundation.h],
498 [
499 LDFLAGS="${LDFLAGS} -framework CoreFoundation"
500 AC_DEFINE(
501 [ENABLE_NFCONV],
502 [1],
503 [Define to 1 if the nfconv patch should be enabled]
504 )
505 ],
506 AC_MSG_ERROR([[Cannot find CoreFoundation required for 'nfconv' functionality Mac OS X. You may use the --disable-nfconv 'configure' option to avoid this error.]])
507 )
508 fi
509 ;;
510esac
511
512# Checks for library functions.
513AC_FUNC_GETMNTENT
514AC_FUNC_MBRTOWC
515AC_FUNC_MEMCMP
516AC_FUNC_STAT
517AC_FUNC_STRFTIME
518AC_FUNC_UTIME_NULL
519AC_FUNC_VPRINTF
520AC_CHECK_FUNCS([ \
521 atexit basename daemon dup2 fdatasync ffs getopt_long hasmntopt \
522 mbsinit memmove memset realpath regcomp setlocale setxattr \
523 strcasecmp strchr strdup strerror strnlen strsep strtol strtoul \
524 sysconf utime utimensat gettimeofday clock_gettime fork memcpy random snprintf \
525])
526AC_SYS_LARGEFILE
527
528if test "$GCC" = "yes" ; then
529 # We add -Wall to enable some compiler warnings.
530 CFLAGS="${CFLAGS} -Wall"
531fi
532
533if test "${enable_pedantic}" = "yes"; then
534 enable_warnings="yes"
535 CFLAGS="${CFLAGS} -pedantic"
536fi
537
538if test "${enable_warnings}" = "yes"; then
539 CFLAGS="${CFLAGS} -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wmultichar -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wformat -Wformat-security -Wuninitialized"
540fi
541
542if test "${enable_debug}" = "yes"; then
543 CFLAGS="${CFLAGS} -ggdb3 -DDEBUG"
544 AC_DEFINE(
545 [ENABLE_DEBUG],
546 [1],
547 [Define to 1 if debug should be enabled]
548 )
549fi
550
551test "${enable_device_default_io_ops}" = "no" && AC_DEFINE(
552 [NO_NTFS_DEVICE_DEFAULT_IO_OPS],
553 [1],
554 [Don't use default IO ops]
555)
556
557test "${enable_mtab}" = "no" && AC_DEFINE([IGNORE_MTAB], [1], [Don't update /etc/mtab])
558test "${enable_posix_acls}" != "no" && AC_DEFINE([POSIXACLS], [1], [POSIX ACL support])
559test "${enable_xattr_mappings}" != "no" && AC_DEFINE([XATTR_MAPPINGS], [1], [system extended attributes mappings])
560
561test "${enable_really_static}" = "yes" && enable_library="no"
562test "${enable_library}" = "no" && enable_ldconfig="no"
563
564if test "x${DISTCHECK_HACK}" != "x"; then
565 enable_mount_helper="no"
566 enable_ldconfig="no"
567fi
568
569# Settings
570pkgconfigdir="\$(libdir)/pkgconfig"
571ntfs3gincludedir="\$(includedir)/ntfs-3g"
572# Executables should be installed to the root filesystem, otherwise
573# automounting NTFS volumes can fail during boot if the driver binaries
574# and their dependencies are on an unmounted partition. Use --exec-prefix
575# to override this.
576if test "x${exec_prefix}" = "xNONE"; then
577 rootbindir="/bin"
578 rootsbindir="/sbin"
579 rootlibdir="/lib${libdir##*/lib}"
580else
581 rootbindir="\$(bindir)"
582 rootsbindir="\$(sbindir)"
583 rootlibdir="\$(libdir)"
584fi
585AC_SUBST([pkgconfigdir])
586AC_SUBST([ntfs3gincludedir])
587AC_SUBST([rootbindir])
588AC_SUBST([rootsbindir])
589AC_SUBST([rootlibdir])
590AC_SUBST([LIBNTFS_3G_VERSION])
591AC_SUBST([LIBFUSE_LITE_CFLAGS])
592AC_SUBST([LIBFUSE_LITE_LIBS])
593AC_SUBST([MKNTFS_CPPFLAGS])
594AC_SUBST([MKNTFS_LIBS])
595AC_SUBST([LIBNTFS_CPPFLAGS])
596AC_SUBST([LIBNTFS_LIBS])
597AC_SUBST([NTFSPROGS_STATIC_LIBS])
598AC_SUBST([OUTPUT_FORMAT])
599AM_CONDITIONAL([FUSE_INTERNAL], [test "${with_fuse}" = "internal"])
600AM_CONDITIONAL([GENERATE_LDSCRIPT], [test "${enable_ldscript}" = "yes"])
601AM_CONDITIONAL([WINDOWS], [test "${WINDOWS}" = "yes"])
602AM_CONDITIONAL([NTFS_DEVICE_DEFAULT_IO_OPS], [test "${enable_device_default_io_ops}" = "yes"])
603AM_CONDITIONAL([RUN_LDCONFIG], [test "${enable_ldconfig}" = "yes"])
604AM_CONDITIONAL([REALLYSTATIC], [test "${enable_really_static}" = "yes"])
605AM_CONDITIONAL([INSTALL_LIBRARY], [test "${enable_library}" = "yes"])
606AM_CONDITIONAL([ENABLE_MOUNT_HELPER], [test "${enable_mount_helper}" = "yes"])
607AM_CONDITIONAL([ENABLE_NTFS_3G], [test "${enable_ntfs_3g}" = "yes"])
608AM_CONDITIONAL([ENABLE_NTFSPROGS], [test "${enable_ntfsprogs}" = "yes"])
609AM_CONDITIONAL([ENABLE_EXTRAS], [test "${enable_extras}" = "yes"])
610
611# workaround for <autoconf-2.60
612if test -z "${docdir}"; then
613 docdir="\$(datarootdir)/doc/\$(PACKAGE_NAME)"
614 AC_SUBST([docdir])
615fi
616# workaround for <automake-1.10
617if test -z "${MKDIR_P}"; then
618 MKDIR_P="\$(mkdir_p)"
619 AC_SUBST([MKDIR_P])
620fi
621
622# generate files
623AC_CONFIG_FILES([
624 Makefile
625 include/Makefile
626 include/fuse-lite/Makefile
627 include/ntfs-3g/Makefile
628 libfuse-lite/Makefile
629 libntfs-3g/Makefile
630 libntfs-3g/libntfs-3g.pc
631 libntfs-3g/libntfs-3g.script.so
632 ntfsprogs/Makefile
633 ntfsprogs/mkntfs.8
634 ntfsprogs/ntfscat.8
635 ntfsprogs/ntfsclone.8
636 ntfsprogs/ntfscluster.8
637 ntfsprogs/ntfscmp.8
638 ntfsprogs/ntfscp.8
639 ntfsprogs/ntfsfix.8
640 ntfsprogs/ntfsinfo.8
641 ntfsprogs/ntfslabel.8
642 ntfsprogs/ntfsls.8
643 ntfsprogs/ntfsprogs.8
644 ntfsprogs/ntfsresize.8
645 ntfsprogs/ntfsundelete.8
646 src/Makefile
647 src/ntfs-3g.8
648 src/ntfs-3g.probe.8
649 src/ntfs-3g.usermap.8
650 src/ntfs-3g.secaudit.8
651])
652AC_OUTPUT
653
654if test "${with_fuse}" = "external"; then
655 if ! echo "x$FUSE_LIB_PATH" | grep -- "x-L/lib" > /dev/null; then
656 cat <<EOF
657****************************************************************************
658* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *
659* The FUSE user space binaries were NOT installed with root directory *
660* executable prefix. This means that automounting NTFS volumes during boot *
661* could fail. This can be fixed the below way by reinstalling FUSE using *
662* the right 'configure' option during FUSE compilation: *
663* ./configure --exec-prefix=/ *
664* make && sudo make install *
665* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *
666****************************************************************************
667EOF
668 fi
669fi
670
671echo "You can type now 'make' to build ntfs-3g."
672
673