Fixed a constant string concatenation
[ntfs-3g.git] / configure.ac
blob88733eb5113dff969342e41cffac6aa2b845df72
2 # configure.ac - Source file to generate "./configure" to prepare package for
3 #                compilation.
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
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.
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.
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
25 # Autoconf
26 AC_PREREQ(2.59)
27 AC_INIT([ntfs-3g],[2017.3.23],[ntfs-3g-devel@lists.sf.net])
28 LIBNTFS_3G_VERSION="88"
29 AC_CONFIG_SRCDIR([src/ntfs-3g.c])
31 # Environment
32 AC_CANONICAL_HOST
33 AC_CANONICAL_TARGET
35 # Automake
36 AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
37 AC_CONFIG_HEADERS([config.h])
38 AC_CONFIG_MACRO_DIR([m4])
39 AM_MAINTAINER_MODE
41 # Options
42 AC_ARG_ENABLE(
43         [debug],
44         [AS_HELP_STRING([--enable-debug],[enable debugging code and output])],
45         ,
46         [enable_debug="no"]
49 AC_ARG_ENABLE(
50         [warnings],
51         [AS_HELP_STRING([--enable-warnings],[enable lots of compiler warnings])],
52         ,
53         [enable_warnings="no"]
56 AC_ARG_ENABLE(
57         [pedantic],
58         [AS_HELP_STRING([--enable-pedantic],[enable compile pedantic mode])],
59         ,
60         [enable_pedantic="no"]
63 AC_ARG_ENABLE(
64         [really-static],
65         [AS_HELP_STRING([--enable-really-static],[create fully static binaries])],
66         ,
67         [enable_really_static="no"]
70 AC_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         ]
82 AC_ARG_ENABLE(
83         [ldscript],
84         [AS_HELP_STRING([--enable-ldscript],[use ldscript instead of .so symlink])],
85         ,
86         [enable_ldscript="no"]
89 AC_ARG_ENABLE(
90         [ldconfig],
91         [AS_HELP_STRING([--disable-ldconfig],[do not update dynamic linker cache using ldconfig])],
92         ,
93         [enable_ldconfig="yes"]
96 AC_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"]
103 AC_ARG_ENABLE(
104         [mtab],
105         [AS_HELP_STRING([--disable-mtab],[disable and ignore usage of /etc/mtab])],
106         ,
107         [enable_mtab="yes"]
110 AC_ARG_ENABLE(
111         [posix-acls],
112         [AS_HELP_STRING([--enable-posix-acls],[enable POSIX ACL support])],
113         ,
114         [enable_posix_acls="no"]
117 AC_ARG_ENABLE(
118         [xattr-mappings],
119         [AS_HELP_STRING([--enable-xattr-mappings],[enable system extended attributes mappings])],
120         ,
121         [enable_xattr_mappings="no"]
124 AC_ARG_ENABLE(
125         [plugins],
126         [AS_HELP_STRING([--disable-plugins], [Disable external reparse point
127          plugins for the ntfs-3g FUSE driver])],
128         [if test x${enableval} = "xyes"; then disable_plugins="no"; fi],
129         [disable_plugins="no"]
132 AC_ARG_ENABLE(
133         [device-default-io-ops],
134         [AS_HELP_STRING([--disable-device-default-io-ops],[install default IO ops])],
135         ,
136         [enable_device_default_io_ops="yes"]
139 AC_ARG_ENABLE(
140         [ntfs-3g],
141         [AS_HELP_STRING([--disable-ntfs-3g],[disable the ntfs-3g FUSE driver])],
142         ,
143         [enable_ntfs_3g="yes"]
146 AC_ARG_ENABLE(
147         [ntfsprogs],
148         [AS_HELP_STRING([--disable-ntfsprogs],[disable ntfsprogs utilities
149                        (default=no)])],
150         ,
151         [enable_ntfsprogs="yes"]
154 AC_ARG_ENABLE(crypto,
155         AS_HELP_STRING(--enable-crypto,enable crypto related code and utilities
156                        (default=no)), ,
157         enable_crypto=no
160 AC_ARG_ENABLE(
161         [extras],
162         [AS_HELP_STRING([--enable-extras],[enable extra ntfsprogs utilities
163                        (default=no)])],
164         ,
165         [enable_extras="no"]
168 AC_ARG_ENABLE(
169         [quarantined],
170         [AS_HELP_STRING([--enable-quarantined],[enable quarantined ntfsprogs utilities
171                        (default=no)])],
172         ,
173         [enable_quarantined="no"]
176 AC_ARG_ENABLE(
177         [nfconv],
178         [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@:>@])],
179         [enable_nfconv="no"],
180         [
181                 case "${target_os}" in
182                         darwin*) enable_nfconv="yes" ;;
183                         *) enable_nfconv="no" ;;
184                 esac
185         ]
188 # pthread_rwlock_t requires _GNU_SOURCE
189 AC_GNU_SOURCE
191 # Programs
192 AC_PROG_CC(gcc cc)
193 AC_PROG_LN_S
194 AM_PROG_CC_C_O
196 ifdef(
197         [LT_INIT],
198         [LT_INIT],
199         [AC_PROG_LIBTOOL]
202 AC_PROG_INSTALL
203 PKG_PROG_PKG_CONFIG
205 AC_PATH_PROG([MV], [mv])
206 AC_PATH_PROG([RM], [rm])
207 AC_PATH_PROG([SED], [sed])
208 AC_ARG_VAR([LDCONFIG], [ldconfig utility])
209 AC_PATH_PROG([LDCONFIG], [ldconfig], [true], [/sbin /usr/sbin $PATH])
211 # Environment
212 AC_MSG_CHECKING([Windows OS])
213 case "${target}" in
214 *-mingw32*|*-winnt*|*-cygwin*)
215         AC_MSG_RESULT([yes])
216         WINDOWS="yes"
217         AC_DEFINE(
218                 [WINDOWS],
219                 [1],
220                 [Define to 1 if this is a Windows OS]
221         )
222         ;;
224         AC_MSG_RESULT([no])
225         WINDOWS="no"
226         ;;
227 esac
229 if test "x${enable_ntfs_3g}" = "xyes"; then
230         AC_MSG_CHECKING([fuse compatibility])
231         case "${target_os}" in
232         linux*|solaris*)
233                 AC_ARG_WITH(
234                         [fuse],
235                         [AS_HELP_STRING([--with-fuse=<internal|external>],[Select FUSE library: internal or external @<:@default=internal@:>@])],
236                         ,
237                         [with_fuse="internal"]
238                 )
239                 ;;
240         darwin*|netbsd*|kfreebsd*-gnu)
241                 with_fuse="external"
242                 ;;
243         freebsd*)
244                 AC_MSG_ERROR([Please see FreeBSD support at http://www.freshports.org/sysutils/fusefs-ntfs])
245                 ;;
246         *)
247                 AC_MSG_ERROR([ntfs-3g can be built for Linux, FreeBSD, Mac OS X, NetBSD, and Solaris only.])
248                 ;;
249         esac
250         AC_MSG_RESULT([${with_fuse}])
251 else
252         with_fuse="none"
255 case "${target_os}" in
256 solaris*)
257         if test "x$GCC" != "xyes" ; then
258                 AC_MSG_ERROR([ntfs-3g can be built only with gcc on Solaris. Install it by 'pkg install gcc-dev' and retry.)])
259         fi
260         ;;
261 esac
263 if test "${enable_ldscript}" = "yes"; then
264         AC_MSG_CHECKING([Output format])
265         OUTPUT_FORMAT="$(${CC} ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | ${SED} -n 's/^OUTPUT_FORMAT("\([[^"]]*\)",.*/\1/p')"
266         if test -z "${OUTPUT_FORMAT}"; then
267                 AC_MSG_RESULT([None])
268         else
269                 AC_MSG_RESULT([${OUTPUT_FORMAT}])
270                 OUTPUT_FORMAT="OUTPUT_FORMAT ( ${OUTPUT_FORMAT} )"
271         fi
274 # Libraries
275 if test "${with_fuse}" = "internal"; then
276         AC_CHECK_LIB(
277                 [pthread],
278                 [pthread_create],
279                 [LIBFUSE_LITE_LIBS="${LIBFUSE_LITE_LIBS} -lpthread"],
280                 [AC_MSG_ERROR([Cannot find pthread library])]
281         )
282         AC_DEFINE(
283                 [_REENTRANT],
284                 [1],
285                 [Required define if using POSIX threads]
286         )
287         # required so that we re-compile anything
288         AC_DEFINE(
289                 [FUSE_INTERNAL],
290                 [1],
291                 [Define to 1 if using internal fuse]
292         )
294         AC_MSG_CHECKING([Solaris OS])
295         AC_LANG_PUSH([C])
296         AC_COMPILE_IFELSE(
297                 [
298                         AC_LANG_SOURCE(
299                                 [[#if !((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))]]
300                                 [[#error "Not a Solaris system."]]
301                                 [[#endif]]
302                         )
303                 ],
304                 [
305                         AC_MSG_RESULT([yes])
306                         LIBFUSE_LITE_CFLAGS="${LIBFUSE_LITE_CFLAGS} -std=c99 -D__SOLARIS__ -D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
307                         LIBFUSE_LITE_LIBS="${LIBFUSE_LITE_LIBS} -lxnet"
308                 ],
309                 [
310                         AC_MSG_RESULT([no])
311                 ]
312         )
313         AC_LANG_POP([C])
314 elif test "${with_fuse}" = "external"; then
315         if test -z "$PKG_CONFIG"; then
316                 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
317         fi
318         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/])
319         # Libraries often install their metadata .pc files in directories
320         # not searched by pkg-config. Let's workaround this. 
321         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
322         PKG_CHECK_MODULES(
323                 [FUSE_MODULE],
324                 [fuse >= 2.6.0],
325                 ,
326                 [
327                         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])
328                 ]
329         )
330         FUSE_LIB_PATH=`$PKG_CONFIG --libs-only-L fuse | sed -e 's,/[/]*,/,g' -e 's,[ ]*$,,'`
333 # Autodetect whether we can build crypto stuff or not.
334 compile_crypto=false
335 if test "$enable_crypto" != "no"; then
336         have_libgcrypt=false
337         AM_PATH_LIBGCRYPT(1.2.2, [ have_libgcrypt=true ],
338         [
339                 if test "$enable_crypto" = "yes"; then
340                         AC_MSG_ERROR([ntfsprogs crypto code requires the gcrypt library.])
341                 else
342                         AC_MSG_WARN([ntfsprogs crypto code requires the gcrypt library.])
343                 fi
344         ])
345         have_libgnutls=false
346         PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.4, [ have_libgnutls=true ],
347                 if test "$enable_crypto" = "yes"; then
348                         AC_MSG_ERROR([ntfsprogs crypto code requires the gnutls library.])
349                 else
350                         AC_MSG_WARN([ntfsprogs crypto code requires the gnutls library.])
351                 fi
352         )
353         if test "$have_libgcrypt" = "true"; then
354                 if test "$have_libgnutls" = "true"; then
355                         compile_crypto=true
356                         AC_DEFINE([ENABLE_CRYPTO], 1,
357                         [Define this to 1 if you want to enable support of
358                          encrypted files in libntfs and utilities.])
359                 fi
360         fi
362 AM_CONDITIONAL(ENABLE_CRYPTO, $compile_crypto)
364 # add --with-extra-includes and --with-extra-libs switch to ./configure
365 all_libraries="$all_libraries $USER_LDFLAGS"
366 all_includes="$all_includes $USER_INCLUDES"
367 AC_SUBST(all_includes)
368 AC_SUBST(all_libraries)
370 # Specify support for generating DCE compliant UUIDs (aka GUIDs).  We check if
371 # uuid/uuid.h header is present and the uuid library is present that goes with
372 # it and then check if uuid_generate() is present and usable.
374 # DCE UUIDs are enabled by default and can be disabled with the --disable-uuid
375 # option to the configure script.
376 AC_ARG_WITH(uuid, [
377   --with-uuid@<:@=PFX@:>@       generate DCE compliant UUIDs, with optional prefix
378                           to uuid library and headers @<:@default=detect@:>@
379   --without-uuid          do not generate DCE compliant UUIDs],
380         if test "$with_uuid" = "yes"; then
381                 extrapath=default
382         elif test "$with_uuid" = "no"; then
383                 extrapath=
384         else
385                 extrapath=$with_uuid
386         fi,
387         extrapath=default
389 if test "x$extrapath" != "x"; then
390         if test "x$extrapath" != "xdefault"; then
391                 MKNTFS_CPPFLAGS="$MKNTFS_CPPFLAGS -I$extrapath/include"
392                 MKNTFS_LIBS="$MKNTFS_LIBS -L$extrapath/lib"
393         fi
395         search_for_luuid="yes"
396         AC_CHECK_HEADER([uuid/uuid.h],
397                 [],
398                 [
399                         AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
400                         search_for_luuid="no"
401                 ],
402         )
404         if test "x$search_for_luuid" != "xno"; then
405                 # Look for uuid_generate in the standard C library.
406                 AC_CHECK_FUNC([uuid_generate],
407                         [
408                                 AC_DEFINE([ENABLE_UUID], 1,
409                                         [Define this to 1 if you want to enable
410                                         generation of DCE compliant UUIDs.])
411                                 search_for_luuid="no"
412                         ],
413                         [],
414                 )
415         fi
417         if test "x$search_for_luuid" != "xno"; then
418                 # Look for uuid_generate in the 'uuid' library.
419                 AC_CHECK_LIB([uuid], [uuid_generate],
420                         [
421                                 AC_DEFINE([ENABLE_UUID], 1,
422                                         [Define this to 1 if you want to enable
423                                         generation of DCE compliant UUIDs.])
424                                 MKNTFS_LIBS="$MKNTFS_LIBS -luuid"
425                                 search_for_luuid="no"
426                         ],
427                         [],
428                 )
429         fi
431         if test "x$search_for_luuid" != "xno"; then
432                 AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
433         fi
436 # Specify support for obtaining the correct BIOS legacy geometry needed for
437 # Windows to boot in CHS mode.  We check if hd.h header is present and the hd
438 # library is present that goes with it and then check if the hd_list() function
439 # is present and usable.
441 # Using the hd library is enabled by default and can be disabled with the
442 # --disable-hd option to the configure script.
443 AC_ARG_WITH(hd, [
444   --with-hd@<:@=PFX@:>@         use Windows compliant disk geometry, with optional
445                           prefix to hd library and headers @<:@default=detect@:>@
446   --without-hd            do not use Windows compliant disk geometry],
447         if test "$with_hd" = "yes"; then
448                 extrapath2=default
449         elif test "$with_hd" = "no"; then
450                 extrapath2=
451         else
452                 extrapath2=$with_hd
453         fi,
454         extrapath2=default
456 if test "x$extrapath2" != "x"; then
457         if test "x$extrapath2" != "xdefault"; then
458                 LIBNTFS_CPPFLAGS="$LIBNTFS_CPPFLAGS -I$extrapath2/include"
459                 LIBNTFS_LIBS="$LIBNTFS_LIBS -L$extrapath2/lib"
460         fi
461         AC_CHECK_HEADER([hd.h],
462                 AC_CHECK_LIB([hd], [hd_list],
463                         AC_DEFINE([ENABLE_HD], 1,
464                         [Define this to 1 if you want to enable use of Windows
465                         compliant disk geometry.])
466                         LIBNTFS_LIBS="$LIBNTFS_LIBS -lhd"
467                         NTFSPROGS_STATIC_LIBS="$NTFSPROGS_STATIC_LIBS -lhd",
468                         AC_MSG_WARN([ntfsprogs Windows compliant geometry code requires the hd library.]),
469                 ),
470                 AC_MSG_WARN([ntfsprogs Windows compliant geometry code requires the hd library.]),
471         )
474 # Checks for header files.
475 AC_HEADER_STDC
476 AC_HEADER_MAJOR
477 AC_CHECK_HEADERS([ctype.h fcntl.h libgen.h libintl.h limits.h locale.h \
478         mntent.h stddef.h stdint.h stdlib.h stdio.h stdarg.h string.h \
479         strings.h errno.h time.h unistd.h utime.h wchar.h getopt.h features.h \
480         regex.h endian.h byteswap.h sys/byteorder.h sys/disk.h sys/endian.h \
481         sys/param.h sys/ioctl.h sys/mount.h sys/stat.h sys/types.h \
482         sys/vfs.h sys/statvfs.h linux/major.h linux/fd.h \
483         linux/fs.h inttypes.h linux/hdreg.h \
484         machine/endian.h windows.h syslog.h pwd.h malloc.h])
486 # Checks for typedefs, structures, and compiler characteristics.
487 AC_HEADER_STDBOOL
488 AC_C_BIGENDIAN(
489         ,
490         [
491                 AC_DEFINE(
492                         [WORDS_LITTLEENDIAN],
493                         [1],
494                         [Define to 1 if your processor stores words with the least significant
495                         byte first (like Intel and VAX, unlike Motorola and SPARC).]
496                 )
497         ]
498         ,
500 AC_C_CONST
501 AC_C_INLINE
502 AC_TYPE_OFF_T
503 AC_TYPE_SIZE_T
504 AC_STRUCT_ST_BLOCKS
505 AC_CHECK_MEMBERS([struct stat.st_rdev])
506 AC_CHECK_MEMBERS([struct stat.st_atim])
507 AC_CHECK_MEMBERS([struct stat.st_atimespec])
508 AC_CHECK_MEMBERS([struct stat.st_atimensec])
510 # For the 'nfconv' patch (Mac OS X only):
511 case "${target_os}" in
512 darwin*)
513         if test "${enable_nfconv}" = "yes"; then
514                 AC_CHECK_HEADER(
515                         [CoreFoundation/CoreFoundation.h],
516                         [
517                                 LDFLAGS="${LDFLAGS} -framework CoreFoundation"
518                                 AC_DEFINE(
519                                         [ENABLE_NFCONV],
520                                         [1],
521                                         [Define to 1 if the nfconv patch should be enabled]
522                                 )
523                         ],
524                         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.]])
525                 )
526         fi
527         ;;
528 esac
530 # Checks for library functions.
531 AC_FUNC_GETMNTENT
532 AC_FUNC_MBRTOWC
533 AC_FUNC_MEMCMP
534 AC_FUNC_STAT
535 AC_FUNC_STRFTIME
536 AC_FUNC_UTIME_NULL
537 AC_FUNC_VPRINTF
538 AC_CHECK_FUNCS([ \
539         atexit basename daemon dup2 fdatasync ffs getopt_long hasmntopt \
540         mbsinit memmove memset realpath regcomp setlocale setxattr \
541         strcasecmp strchr strdup strerror strnlen strsep strtol strtoul \
542         sysconf utime utimensat gettimeofday clock_gettime fork memcpy random snprintf \
544 AC_SYS_LARGEFILE
546 # The dlopen API might be in libc or in libdl.  Check libc first, then
547 # fall back to libdl.
548 LIBDL=""
549 if test "x${disable_plugins}" = "xno"; then
550         AC_CHECK_LIB(c, dlopen, ,
551                 [AC_CHECK_LIB(dl, dlopen, [LIBDL="-ldl"],
552                         [AC_MSG_ERROR(["Unable to find libdl (required for external plugin support)"])])])
554 AC_SUBST([LIBDL])
556 if test "$GCC" = "yes" ; then
557         # We add -Wall to enable some compiler warnings.
558         CFLAGS="${CFLAGS} -Wall"
561 if test "${enable_pedantic}" = "yes"; then
562         enable_warnings="yes"
563         CFLAGS="${CFLAGS} -pedantic"
566 if test "${enable_warnings}" = "yes"; then
567         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"
570 if test "${enable_debug}" = "yes"; then
571         CFLAGS="${CFLAGS} -ggdb3 -DDEBUG"
572         AC_DEFINE(
573                 [ENABLE_DEBUG],
574                 [1],
575                 [Define to 1 if debug should be enabled]
576         )
579 test "${enable_device_default_io_ops}" = "no" && AC_DEFINE(
580         [NO_NTFS_DEVICE_DEFAULT_IO_OPS],
581         [1],
582         [Don't use default IO ops]
585 test "${enable_mtab}" = "no" && AC_DEFINE([IGNORE_MTAB], [1], [Don't update /etc/mtab])
586 test "${enable_posix_acls}" != "no" && AC_DEFINE([POSIXACLS], [1], [POSIX ACL support])
587 test "${enable_xattr_mappings}" != "no" && AC_DEFINE([XATTR_MAPPINGS], [1], [system extended attributes mappings])
588 test "${disable_plugins}" != "no" && AC_DEFINE([DISABLE_PLUGINS], [1], [Define to 1 for disabling reparse plugins])
590 test "${enable_really_static}" = "yes" && enable_library="no"
591 test "${enable_library}" = "no" && enable_ldconfig="no"
593 if test "x${DISTCHECK_HACK}" != "x"; then
594         enable_mount_helper="no"
595         enable_ldconfig="no"
598 # Settings
599 pkgconfigdir="\$(libdir)/pkgconfig"
600 ntfs3gincludedir="\$(includedir)/ntfs-3g"
601 # Executables should be installed to the root filesystem, otherwise 
602 # automounting NTFS volumes can fail during boot if the driver binaries 
603 # and their dependencies are on an unmounted partition. Use --exec-prefix
604 # to override this.
605 if test "x${exec_prefix}" = "xNONE"; then
606         rootbindir="/bin"
607         rootsbindir="/sbin"
608         rootlibdir="/lib${libdir##*/lib}"
609 else
610         rootbindir="\$(bindir)"
611         rootsbindir="\$(sbindir)"
612         rootlibdir="\$(libdir)"
614 AC_SUBST([pkgconfigdir])
615 AC_SUBST([ntfs3gincludedir])
616 AC_SUBST([rootbindir])
617 AC_SUBST([rootsbindir])
618 AC_SUBST([rootlibdir])
619 AC_SUBST([LIBNTFS_3G_VERSION])
620 AC_SUBST([LIBFUSE_LITE_CFLAGS])
621 AC_SUBST([LIBFUSE_LITE_LIBS])
622 AC_SUBST([MKNTFS_CPPFLAGS])
623 AC_SUBST([MKNTFS_LIBS])
624 AC_SUBST([LIBNTFS_CPPFLAGS])
625 AC_SUBST([LIBNTFS_LIBS])
626 AC_SUBST([NTFSPROGS_STATIC_LIBS])
627 AC_SUBST([OUTPUT_FORMAT])
628 AM_CONDITIONAL([FUSE_INTERNAL], [test "${with_fuse}" = "internal"])
629 AM_CONDITIONAL([GENERATE_LDSCRIPT], [test "${enable_ldscript}" = "yes"])
630 AM_CONDITIONAL([WINDOWS], [test "${WINDOWS}" = "yes"])
631 AM_CONDITIONAL([NTFS_DEVICE_DEFAULT_IO_OPS], [test "${enable_device_default_io_ops}" = "yes"])
632 AM_CONDITIONAL([RUN_LDCONFIG], [test "${enable_ldconfig}" = "yes"])
633 AM_CONDITIONAL([REALLYSTATIC], [test "${enable_really_static}" = "yes"])
634 AM_CONDITIONAL([INSTALL_LIBRARY], [test "${enable_library}" = "yes"])
635 AM_CONDITIONAL([ENABLE_MOUNT_HELPER], [test "${enable_mount_helper}" = "yes"])
636 AM_CONDITIONAL([ENABLE_NTFS_3G], [test "${enable_ntfs_3g}" = "yes"])
637 AM_CONDITIONAL([ENABLE_NTFSPROGS], [test "${enable_ntfsprogs}" = "yes"])
638 AM_CONDITIONAL([ENABLE_EXTRAS], [test "${enable_extras}" = "yes"])
639 AM_CONDITIONAL([ENABLE_QUARANTINED], [test "${enable_quarantined}" = "yes"])
640 AM_CONDITIONAL([DISABLE_PLUGINS], [test "${disable_plugins}" != "no"])
642 # workaround for <autoconf-2.60
643 if test -z "${docdir}"; then
644         docdir="\$(datarootdir)/doc/\$(PACKAGE_NAME)"
645         AC_SUBST([docdir])
647 # workaround for <automake-1.10
648 if test -z "${MKDIR_P}"; then
649         MKDIR_P="\$(mkdir_p)"
650         AC_SUBST([MKDIR_P])
653 # generate files
654 AC_CONFIG_FILES([
655         Makefile
656         include/Makefile
657         include/fuse-lite/Makefile
658         include/ntfs-3g/Makefile
659         libfuse-lite/Makefile
660         libntfs-3g/Makefile
661         libntfs-3g/libntfs-3g.pc
662         libntfs-3g/libntfs-3g.script.so
663         ntfsprogs/Makefile
664         ntfsprogs/mkntfs.8
665         ntfsprogs/ntfscat.8
666         ntfsprogs/ntfsclone.8
667         ntfsprogs/ntfscluster.8
668         ntfsprogs/ntfscmp.8
669         ntfsprogs/ntfscp.8
670         ntfsprogs/ntfsfix.8
671         ntfsprogs/ntfsinfo.8
672         ntfsprogs/ntfslabel.8
673         ntfsprogs/ntfsls.8
674         ntfsprogs/ntfsprogs.8
675         ntfsprogs/ntfsresize.8
676         ntfsprogs/ntfsundelete.8
677         ntfsprogs/ntfsdecrypt.8
678         ntfsprogs/ntfswipe.8
679         ntfsprogs/ntfstruncate.8
680         ntfsprogs/ntfsfallocate.8
681         ntfsprogs/ntfsrecover.8
682         ntfsprogs/ntfsusermap.8
683         ntfsprogs/ntfssecaudit.8
684         src/Makefile
685         src/ntfs-3g.8
686         src/ntfs-3g.probe.8
688 AC_OUTPUT
690 if test "${with_fuse}" = "external"; then
691         if ! echo "x$FUSE_LIB_PATH" | grep -- "x-L/lib" > /dev/null; then
692                 cat <<EOF
693 ****************************************************************************
694 * WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING   *
695 * The FUSE user space binaries were NOT installed with root directory      *
696 * executable prefix. This means that automounting NTFS volumes during boot *
697 * could fail. This can be fixed the below way by reinstalling FUSE using   *
698 * the right 'configure' option during FUSE compilation:                    *
699 *       ./configure --exec-prefix=/                                        *
700 *       make && sudo make install                                          *
701 * WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING   *
702 ****************************************************************************
704         fi
707 echo "You can type now 'make' to build ntfs-3g."