]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - configure.ac
xfs: trim writepage mapping to within eof
[thirdparty/xfsprogs-dev.git] / configure.ac
1 AC_INIT([xfsprogs], [4.13.1], [linux-xfs@vger.kernel.org])
2 AC_PREREQ(2.50)
3 AC_CONFIG_AUX_DIR([.])
4 AC_CONFIG_MACRO_DIR([m4])
5 AC_CONFIG_SRCDIR([include/libxfs.h])
6 AC_CONFIG_HEADER(include/platform_defs.h)
7 AC_PREFIX_DEFAULT(/usr)
8
9 AC_PROG_INSTALL
10 AC_PROG_LIBTOOL
11
12 AC_PROG_CC
13 AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
14 if test "${BUILD_CC+set}" != "set"; then
15 if test $cross_compiling = no; then
16 BUILD_CC="$CC"
17 else
18 AC_CHECK_PROGS(BUILD_CC, gcc cc)
19 fi
20 fi
21 AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
22 if test "${BUILD_CFLAGS+set}" != "set"; then
23 if test $cross_compiling = no; then
24 BUILD_CFLAGS="$CFLAGS"
25 else
26 BUILD_CFLAGS="-g -O2"
27 fi
28 fi
29
30 AC_ARG_ENABLE(shared,
31 [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
32 enable_shared=yes)
33 AC_SUBST(enable_shared)
34
35 AC_ARG_ENABLE(gettext,
36 [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
37 enable_gettext=yes)
38 AC_SUBST(enable_gettext)
39
40 AC_ARG_ENABLE(blkid,
41 [ --enable-blkid=[yes/no] Enable use of block device id library [default=yes]],,
42 enable_blkid=yes)
43 AC_SUBST(enable_blkid)
44
45 AC_ARG_ENABLE(readline,
46 [ --enable-readline=[yes/no] Enable readline command editing [default=no]],
47 test $enable_readline = yes && libreadline="-lreadline",
48 enable_readline=no)
49 AC_SUBST(libreadline)
50 AC_SUBST(enable_readline)
51
52 AC_ARG_ENABLE(editline,
53 [ --enable-editline=[yes/no] Enable editline command editing [default=no]],
54 test $enable_editline = yes && libeditline="-ledit",
55 enable_editline=no)
56 AC_SUBST(libeditline)
57 AC_SUBST(enable_editline)
58
59 AC_ARG_ENABLE(termcap,
60 [ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
61 test $enable_termcap = yes && libtermcap="-ltermcap",)
62 AC_SUBST(libtermcap)
63
64
65 AC_ARG_ENABLE(lib64,
66 [ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
67 enable_lib64=yes)
68 AC_SUBST(enable_lib64)
69
70 AC_ARG_ENABLE(librt,
71 [ --enable-librt=[yes/no] Enable librt support [default=yes]],,
72 enable_librt=yes)
73 AC_SUBST(enable_librt)
74
75 #
76 # If the user specified a libdir ending in lib64 do not append another
77 # 64 to the library names.
78 #
79 base_libdir=`basename "$libdir"`
80 case $base_libdir in
81 lib64)
82 enable_lib64=no
83 esac
84
85 #
86 # Some important tools should be installed into the root partitions.
87 #
88 # Check whether exec_prefix=/usr: and install them to /sbin in that
89 # case. If the user choses a different prefix assume he just wants
90 # a local install for testing and not a system install.
91 #
92 case $exec_prefix:$prefix in
93 NONE:NONE | NONE:/usr | /usr:*)
94 root_sbindir='/sbin'
95 root_libdir="/${base_libdir}"
96 ;;
97 *)
98 root_sbindir="${sbindir}"
99 root_libdir="${libdir}"
100 ;;
101 esac
102
103 AC_SUBST([root_sbindir])
104 AC_SUBST([root_libdir])
105
106 # Find localized files. Don't descend into any "dot directories"
107 # (like .git or .pc from quilt). Strangely, the "-print" argument
108 # to "find" is required, to avoid including such directories in the
109 # list.
110 LOCALIZED_FILES=""
111 for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
112 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
113 done
114 AC_SUBST(LOCALIZED_FILES)
115
116 AC_PACKAGE_GLOBALS(xfsprogs)
117 AC_PACKAGE_UTILITIES(xfsprogs)
118 AC_MULTILIB($enable_lib64)
119 AC_RT($enable_librt)
120
121 AC_PACKAGE_NEED_UUID_H
122 AC_PACKAGE_NEED_UUIDCOMPARE
123
124 AC_PACKAGE_NEED_PTHREAD_H
125 AC_PACKAGE_NEED_PTHREADMUTEXINIT
126
127 AC_HAVE_FADVISE
128 AC_HAVE_MADVISE
129 AC_HAVE_MINCORE
130 AC_HAVE_SENDFILE
131 AC_HAVE_GETMNTENT
132 AC_HAVE_GETMNTINFO
133 AC_HAVE_FALLOCATE
134 AC_HAVE_FIEMAP
135 AC_HAVE_PREADV
136 AC_HAVE_COPY_FILE_RANGE
137 AC_HAVE_SYNC_FILE_RANGE
138 AC_HAVE_SYNCFS
139 AC_HAVE_MNTENT
140 AC_HAVE_FLS
141 AC_HAVE_READDIR
142 AC_HAVE_FSETXATTR
143 AC_HAVE_MREMAP
144 AC_NEED_INTERNAL_FSXATTR
145 AC_HAVE_GETFSMAP
146
147 if test "$enable_blkid" = yes; then
148 AC_HAVE_BLKID_TOPO
149 fi
150
151 AC_CHECK_SIZEOF([long])
152 AC_CHECK_SIZEOF([char *])
153 AC_TYPE_UMODE_T
154 AC_MANUAL_FORMAT
155
156 AC_CONFIG_FILES([include/builddefs])
157 AC_OUTPUT