2 AC_INIT(ntfsprogs, 200309071734, linux-ntfs-dev@lists.sourceforge.net)
3 AC_CANONICAL_TARGET([])
4 AC_CONFIG_SRCDIR([config.h.in])
5 AM_CONFIG_HEADER([config.h])
8 # This is required to get past a stupid configure bug when making the rpm.
9 # Basically it is broken to specify the host as a command line argument to
10 # configure on its own, i.e. without giving --host=. It is supposed to work
11 # but doesn't. So this sets host and erases nonopt effectively moving the
12 # standalone command line option into the --host= form.
13 if test "x$nonopt" != "xNONE"; then
19 if test "$USE_MAINTAINER_MODE" = "yes";then
20 CFLAGS="$CFLAGS -ggdb3 -Wall -Wstrict-prototypes -Wsign-compare" ## FIXME: fix all sources: -Wsign-compare
23 AC_PREFIX_DEFAULT(/usr/local)
24 if test "x$prefix" = "xNONE"; then
25 prefix=$ac_default_prefix
26 ac_configure_args="$ac_configure_args --prefix $prefix"
29 # Command-line options.
31 [ --enable-debug enable debugging], ,
35 AC_ARG_ENABLE(really-static,
36 [ --enable-really-static completely static binaries], ,
37 enable_really_static=no
40 AM_CONDITIONAL(DEBUG, test "$enable_debug" = yes)
41 AM_CONDITIONAL(REALLYSTATIC, test "$enable_really_static" = yes)
43 # Checks for programs.
49 # create a working libtool-script
50 if test -z "$LIBTOOL"; then
53 #LIBTOOL="$LIBTOOL --silent"
55 AC_SUBST(LIBTOOL_DEPS)
56 LIBTOOL_SHELL='/bin/sh ./libtool'
58 LIBTOOL_SHELL=$LIBTOOL
61 # add --with-extra-includes and --with-extra-libs switch to ./configure
62 all_libraries="$all_libraries $USER_LDFLAGS"
63 all_includes="$all_includes $USER_INCLUDES"
64 AC_SUBST(all_includes)
65 AC_SUBST(all_libraries)
74 if test ! -z "$CC"; then
80 # Check for gcc version being >= 2.96.
81 AC_MSG_CHECKING(version of $_cc)
82 cc_version=`./getgccver $_cc`
83 cc_major=`echo $cc_version | cut -d'.' -f1`
84 cc_minor=`echo $cc_version | cut -d'.' -f2`
85 if test -z "$cc_version"; then
90 if test $cc_major -lt 2 -o \( $cc_major -eq 2 -a $cc_minor -lt 96 \) ; then
91 cc_version="$cc_version, bad"
92 AC_MSG_RESULT($cc_version)
93 AC_MSG_ERROR(Please upgrade your gcc compiler to gcc-2.96+ or gcc-3+ version!\
94 Earlier compiler versions will NOT work as these do not support \
95 unnamed/annonymous structures and unions which are used heavily in linux-ntfs.)
97 cc_version="$cc_version, ok"
98 AC_MSG_RESULT($cc_version)
100 # Add -fms-extensions for gcc-3.2+.
101 AM_CONDITIONAL(GCC_NEEDS_MS_EXTENSIONS, test $cc_major -gt 3 -o \( $cc_major -eq 3 -a $cc_minor -ge 2 \))
103 # Checks for libraries.
105 # Checks for header files.
107 AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h \
108 stdint.h stdlib.h stdio.h stdarg.h string.h strings.h errno.h time.h \
109 sys/ioctl.h sys/mount.h unistd.h utime.h wchar.h getopt.h sys/stat.h \
110 sys/types.h asm/byteorder.h linux/major.h linux/fd.h])
112 # Checks for typedefs, structures, and compiler characteristics.
120 AC_CHECK_MEMBERS([struct stat.st_rdev])
122 # Checks for library functions.
124 AC_PROG_GCC_TRADITIONAL
133 AC_CHECK_FUNCS([atexit fdatasync hasmntopt memmove memset regcomp setlocale \
134 strcasecmp strchr strdup strerror strtol strtoul utime])
136 # Makefiles to be created by configure.
146 ntfsprogs/ntfslabel.8
147 ntfsprogs/ntfsprogs.8
148 ntfsprogs/ntfsresize.8
149 ntfsprogs/ntfsundelete.8
150 ntfsprogs/ntfscluster.8