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