blob: 33da6e38ab56d224e42621565169b116cd55f187 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001AC_INIT(version.h)
Theodore Ts'o37cdbee2012-12-22 22:24:45 -05002AC_PREREQ(2.54)
Theodore Ts'ob0cacab2004-11-30 19:00:19 -05003AC_CONFIG_AUX_DIR(config)
Theodore Ts'od1154eb2011-09-18 17:34:37 -04004AC_CONFIG_HEADERS([lib/config.h])
Theodore Ts'oc714d022014-01-30 18:48:23 -05005AH_BOTTOM([#include <dirpaths.h>])
Theodore Ts'o50e1e101997-04-26 13:58:21 +00006MCONFIG=./MCONFIG
7AC_SUBST_FILE(MCONFIG)
Theodore Ts'o74becf31997-04-26 14:37:06 +00008BINARY_TYPE=bin
9dnl
10dnl This is to figure out the version number and the date....
11dnl
12E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
13 | awk '{print $3}' | tr \" " " | awk '{print $1}'`
Darrick J. Wong5ce368f2018-03-23 18:57:09 -070014E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
15 | tr \" " " | awk '{print $1}'`
16E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[[1-9]]$/s/^/0/')
17MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'`
18YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'`
Theodore Ts'o74becf31997-04-26 14:37:06 +000019
Theodore Ts'o40fa8cc1999-01-09 05:06:02 +000020if expr $YEAR ">" 1900 > /dev/null ; then
21 E2FSPROGS_YEAR=$YEAR
22elif expr $YEAR ">" 90 >/dev/null ; then
Theodore Ts'o74becf31997-04-26 14:37:06 +000023 E2FSPROGS_YEAR=19$YEAR
24else
25 E2FSPROGS_YEAR=20$YEAR
26fi
27
28case $MONTH in
Andreas Dilger927566a2006-11-12 19:41:25 -050029Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
30Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
31Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
32Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
33May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
34Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
35Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
36Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
37Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
38Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
39Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
40Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
Theodore Ts'o02d04db2008-08-22 10:52:42 -040041*) AC_MSG_WARN([Unknown month $MONTH??]) ;;
Theodore Ts'o74becf31997-04-26 14:37:06 +000042esac
43
Andreas Dilger927566a2006-11-12 19:41:25 -050044base_ver=`echo $E2FSPROGS_VERSION | \
45 sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
Andreas Dilger927566a2006-11-12 19:41:25 -050046
47date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
48
49case $E2FSPROGS_VERSION in
50*-WIP|pre-*)
Theodore Ts'o2ab53822016-03-15 01:10:29 -040051 E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec"
Andreas Dilger927566a2006-11-12 19:41:25 -050052 ;;
53*)
54 E2FSPROGS_PKGVER="$base_ver"
55 ;;
56esac
57
58unset DATE MONTH YEAR base_ver pre_vers date_spec
Theodore Ts'o02d04db2008-08-22 10:52:42 -040059AC_MSG_RESULT([Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION])
60AC_MSG_RESULT([Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}])
Theodore Ts'o74becf31997-04-26 14:37:06 +000061AC_SUBST(E2FSPROGS_YEAR)
62AC_SUBST(E2FSPROGS_MONTH)
Theodore Ts'obff0cc92003-03-23 01:37:53 -050063AC_SUBST(E2FSPROGS_DAY)
Theodore Ts'o74becf31997-04-26 14:37:06 +000064AC_SUBST(E2FSPROGS_VERSION)
Andreas Dilger927566a2006-11-12 19:41:25 -050065AC_SUBST(E2FSPROGS_PKGVER)
Darrick J. Wong5ce368f2018-03-23 18:57:09 -070066AC_SUBST(E2FSPROGS_DATE)
Theodore Ts'o57aa50d2009-11-26 10:38:04 -050067dnl
Theodore Ts'od21ae6c2003-05-05 09:00:24 -040068dnl Use diet libc
69dnl
Theodore Ts'oeafba6c2008-07-10 10:21:42 -040070WITH_DIET_LIBC=
Theodore Ts'od21ae6c2003-05-05 09:00:24 -040071AC_ARG_WITH([diet-libc],
Theodore Ts'o32493942007-12-31 10:45:01 -050072[ --with-diet-libc use diet libc],
Theodore Ts'od21ae6c2003-05-05 09:00:24 -040073CC="diet cc -nostdinc"
Theodore Ts'oeafba6c2008-07-10 10:21:42 -040074WITH_DIET_LIBC=yes
Theodore Ts'o6c59a662014-01-04 20:44:29 -050075if test -z "$LIBS"
76then
77 LIBS="-lcompat"
78else
79 LIBS="$LIBS -lcompat"
80fi
Theodore Ts'od21ae6c2003-05-05 09:00:24 -040081AC_MSG_RESULT(CC=$CC))dnl
82dnl
Theodore Ts'o6c59a662014-01-04 20:44:29 -050083AC_CANONICAL_HOST
84dnl
85dnl Check to see if libdl exists for the sake of dlopen
86dnl
87DLOPEN_LIB=''
Theodore Ts'o32179ce2016-06-07 00:14:35 -040088AC_CHECK_LIB(dl, dlopen,DLOPEN_LIB=-ldl)
Theodore Ts'o6c59a662014-01-04 20:44:29 -050089AC_SUBST(DLOPEN_LIB)
90dnl
Theodore Ts'o74becf31997-04-26 14:37:06 +000091AC_ARG_WITH([cc],
Theodore Ts'o0b5b9f92009-09-06 21:28:47 -040092AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
93AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
Theodore Ts'o74becf31997-04-26 14:37:06 +000094dnl
95AC_ARG_WITH([ccopts],
Theodore Ts'o0b5b9f92009-09-06 21:28:47 -040096AC_HELP_STRING([--with-ccopts],[no longer supported, use CFLAGS= instead]),
97AC_MSG_ERROR([--with-ccopts no longer supported; use CFLAGS= instead]))
98dnl
99AC_ARG_WITH([ldopts],
100AC_HELP_STRING([--with-ldopts],[no longer supported, use LDFLAGS= instead]),
101AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
102dnl
103AC_PROG_CC
Theodore Ts'o9b3018a2011-08-11 14:56:49 -0400104if test "$GCC" = yes; then
105 RDYNAMIC="-rdynamic"
106 AC_SUBST(RDYNAMIC)
107fi
Theodore Ts'o0b5b9f92009-09-06 21:28:47 -0400108AC_PROG_CPP
Theodore Ts'o74becf31997-04-26 14:37:06 +0000109dnl
Matthias Andreeb1c92f92004-02-23 21:30:11 +0100110dnl Alpha computers use fast and imprecise floating point code that may
111dnl miss exceptions by default. Force sane options if we're using GCC.
112AC_MSG_CHECKING(for additional special compiler flags)
113if test "$GCC" = yes
114then
115 case "$host_cpu" in
116 alpha) addcflags="-mieee" ;;
117 esac
118fi
119if test "x$addcflags" != x
120then
121 AC_MSG_RESULT($addcflags)
122 CFLAGS="$addcflags $CFLAGS"
123else
124 AC_MSG_RESULT([[(none)]])
125fi
Theodore Ts'o93613952014-07-03 23:44:13 -0400126AC_USE_SYSTEM_EXTENSIONS
Matthias Andreeb1c92f92004-02-23 21:30:11 +0100127dnl
Sebastian Rasmussen055866d2017-10-08 13:30:08 +0200128dnl Set default values for library extensions. Will be dealt with after
129dnl parsing configuration options, which may modify these
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000130dnl
131LIB_EXT=.a
132STATIC_LIB_EXT=.a
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400133PROFILED_LIB_EXT=.a
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000134dnl
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000135dnl Allow separate `root_prefix' to be specified
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000136dnl
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000137AC_ARG_WITH([root-prefix],
138[ --with-root-prefix=PREFIX override prefix variable for files to be placed in the root],
139root_prefix=$withval,
140root_prefix=NONE)dnl
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000141dnl
Theodore Ts'o98919bd2005-02-04 10:43:58 -0500142dnl handle --enable-maintainer-mode
143dnl
144AC_ARG_ENABLE([maintainer-mode],
145[ --enable-maintainer-mode enable makefile rules useful for maintainers],
146if test "$enableval" = "no"
147then
148 MAINTAINER_CMT=#
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400149 AC_MSG_RESULT([Disabling maintainer mode])
Theodore Ts'o98919bd2005-02-04 10:43:58 -0500150else
151 MAINTAINER_CMT=
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400152 AC_MSG_RESULT([Enabling maintainer mode])
Theodore Ts'o98919bd2005-02-04 10:43:58 -0500153fi
154,
155MAINTAINER_CMT=#
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400156AC_MSG_RESULT([Disabling maintainer mode by default])
Theodore Ts'o98919bd2005-02-04 10:43:58 -0500157)
158AC_SUBST(MAINTAINER_CMT)
159dnl
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -0400160dnl handle --enable-symlink-install
161dnl
162AC_ARG_ENABLE([symlink-install],
163[ --enable-symlink-install use symlinks when installing instead of hard links],
164if test "$enableval" = "no"
165then
166 LINK_INSTALL_FLAGS=-f
167 AC_MSG_RESULT([Disabling symlinks for install])
168else
169 LINK_INSTALL_FLAGS=-sf
170 AC_MSG_RESULT([Enabling symlinks for install])
171fi
172,
173LINK_INSTALL_FLAGS=-f
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400174AC_MSG_RESULT([Disabling symlinks for install by default])
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -0400175)
176AC_SUBST(LINK_INSTALL_FLAGS)
177dnl
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400178dnl handle --enable-relative-symlinks
179dnl
Theodore Ts'o91d11da2012-09-06 23:01:14 -0400180relative_symlink_defined=
181AC_ARG_ENABLE([relative-symlinks],
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400182[ --enable-relative-symlinks use relative symlinks when installing],
183if test "$enableval" = "no"
184then
185 SYMLINK_RELATIVE=
Theodore Ts'o91d11da2012-09-06 23:01:14 -0400186 relative_symlink_defined=yes
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400187 AC_MSG_RESULT([Disabling relative symlinks for install])
188else
189 SYMLINK_RELATIVE=--relative
Theodore Ts'o91d11da2012-09-06 23:01:14 -0400190 relative_symlink_defined=yes
191 AC_MSG_RESULT([Enabling relative symlinks for install])
192fi)
193AC_ARG_ENABLE([symlink-relative-symlinks],,
194if test "$enableval" = "no"
195then
196 SYMLINK_RELATIVE=yes
197 AC_MSG_RESULT([Disabling relative symlinks for install])
198else
199 SYMLINK_RELATIVE=--relative
200 AC_MSG_RESULT([Enabling relative symlinks for install])
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400201fi
202,
Theodore Ts'o91d11da2012-09-06 23:01:14 -0400203if test -z "$relative_symlink_defined"
204then
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400205 SYMLINK_RELATIVE=
206AC_MSG_RESULT([Disabling relative symlinks for install by default])
Theodore Ts'o91d11da2012-09-06 23:01:14 -0400207fi
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400208)
209AC_SUBST(SYMLINK_RELATIVE)
210dnl
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -0400211dnl handle --enable-symlink-build
212dnl
213AC_ARG_ENABLE([symlink-build],
214[ --enable-symlink-build use symlinks while building instead of hard links],
215if test "$enableval" = "no"
216then
217 LINK_BUILD_FLAGS=
218 AC_MSG_RESULT([Disabling symlinks for build])
219else
220 LINK_BUILD_FLAGS=-s
221 AC_MSG_RESULT([Enabling symlinks for build])
222fi
223,
224LINK_BUILD_FLAGS=
Theodore Ts'o183c73b2012-05-12 23:13:24 -0400225AC_MSG_RESULT([Disabling symlinks for build by default])
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -0400226)
227AC_SUBST(LINK_BUILD_FLAGS)
228dnl
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400229dnl handle --enable-verbose-makecmds
230dnl
231AC_ARG_ENABLE([verbose-makecmds],
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -0400232[ --enable-verbose-makecmds enable verbose make command output],
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400233if test "$enableval" = "no"
234then
235 AC_MSG_RESULT([Disabling verbose make commands])
236 E=@echo
Theodore Ts'oc1986ec2012-06-13 15:29:13 -0400237 ES=echo
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400238 Q=@
239else
240 AC_MSG_RESULT([Enabling verbose make commands])
241 E=@\\#
Theodore Ts'oc1986ec2012-06-13 15:29:13 -0400242 ES=\\#
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400243 Q=
244fi
245,
246AC_MSG_RESULT([Disabling verbose make commands])
247E=@echo
Theodore Ts'oc1986ec2012-06-13 15:29:13 -0400248ES=echo
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400249Q=@
250)
251AC_SUBST(E)
Theodore Ts'oc1986ec2012-06-13 15:29:13 -0400252AC_SUBST(ES)
Theodore Ts'oc13351f2009-07-02 00:11:17 -0400253AC_SUBST(Q)
254dnl
Theodore Ts'oa4ece352008-01-01 20:05:04 -0500255dnl This needs to be before all of the --enable-*-shlibs options
256dnl
257E2_PKG_CONFIG_STATIC=--static
Theodore Ts'o55da9872008-09-02 23:12:38 -0400258LDFLAG_DYNAMIC=
259PRIVATE_LIBS_CMT=
Theodore Ts'oa4ece352008-01-01 20:05:04 -0500260dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000261dnl handle --enable-elf-shlibs
262dnl
263AC_ARG_ENABLE([elf-shlibs],
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000264[ --enable-elf-shlibs select ELF shared libraries],
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000265if test "$enableval" = "no"
266then
267 ELF_CMT=#
268 MAKEFILE_ELF=/dev/null
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400269 AC_MSG_RESULT([Disabling ELF shared libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000270else
Theodore Ts'oa4ece352008-01-01 20:05:04 -0500271 E2_PKG_CONFIG_STATIC=
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000272 ELF_CMT=
273 MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
Theodore Ts'of5955dd2000-10-25 02:38:39 +0000274 [case "$host_os" in
275 solaris2.*)
276 MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
277 ;;
278 esac]
Theodore Ts'o74becf31997-04-26 14:37:06 +0000279 BINARY_TYPE=elfbin
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000280 LIB_EXT=.so
Theodore Ts'o55da9872008-09-02 23:12:38 -0400281 PRIVATE_LIBS_CMT=#
282 LDFLAG_DYNAMIC=['-Wl,-rpath-link,$(top_builddir)/lib']
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400283 AC_MSG_RESULT([Enabling ELF shared libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000284fi
285,
286MAKEFILE_ELF=/dev/null
287ELF_CMT=#
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400288AC_MSG_RESULT([Disabling ELF shared libraries by default])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000289)
290AC_SUBST(ELF_CMT)
291AC_SUBST_FILE(MAKEFILE_ELF)
292dnl
293dnl handle --enable-bsd-shlibs
294dnl
295AC_ARG_ENABLE([bsd-shlibs],
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000296[ --enable-bsd-shlibs select BSD shared libraries],
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000297if test "$enableval" = "no"
298then
299 BSDLIB_CMT=#
300 MAKEFILE_BSDLIB=/dev/null
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400301 AC_MSG_RESULT([Disabling BSD shared libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000302else
Theodore Ts'oa4ece352008-01-01 20:05:04 -0500303 E2_PKG_CONFIG_STATIC=
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000304 BSDLIB_CMT=
305 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000306 LIB_EXT=.so
Theodore Ts'oe71d8732003-03-14 02:13:48 -0500307 [case "$host_os" in
Theodore Ts'oaa75ecc2003-03-17 10:01:22 -0500308 darwin*)
Theodore Ts'oe71d8732003-03-14 02:13:48 -0500309 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
310 LIB_EXT=.dylib
311 ;;
312 esac]
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400313 AC_MSG_RESULT([Enabling BSD shared libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000314fi
315,
316MAKEFILE_BSDLIB=/dev/null
317BSDLIB_CMT=#
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400318AC_MSG_RESULT([Disabling BSD shared libraries by default])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000319)
320AC_SUBST(BSDLIB_CMT)
321AC_SUBST_FILE(MAKEFILE_BSDLIB)
322dnl
323dnl handle --enable-profile
324dnl
325AC_ARG_ENABLE([profile],
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000326[ --enable-profile build profiling libraries],
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000327if test "$enableval" = "no"
328then
329 PROFILE_CMT=#
330 MAKEFILE_PROFILE=/dev/null
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400331 AC_MSG_RESULT([Disabling profiling libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000332else
333 PROFILE_CMT=
334 MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000335 PROFILED_LIB_EXT=_p.a
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400336 AC_MSG_RESULT([Building profiling libraries])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000337fi
338,
339PROFILE_CMT=#
340MAKEFILE_PROFILE=/dev/null
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400341AC_MSG_RESULT([Disabling profiling libraries by default])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000342)
343AC_SUBST(PROFILE_CMT)
344AC_SUBST_FILE(MAKEFILE_PROFILE)
345dnl
Theodore Ts'ofedfb272014-02-23 00:17:09 -0500346dnl handle --enable-gcov
347dnl
348AC_ARG_ENABLE([gcov],
349[ --enable-gcov build for coverage testing using gcov],
350if test "$enableval" = "yes"
351then
352 CFLAGS="-g -fprofile-arcs -ftest-coverage"
353 LDFLAGS="-fprofile-arcs -ftest-coverage"
354 AC_MSG_RESULT([Enabling gcov support])
355fi
356)
Theodore Ts'ofd1677e2016-05-21 23:51:19 -0400357dnl
358dnl handle --enable-hardening
359dnl
360CFLAGS_SHLIB="${CFLAGS_SHLIB:-$CFLAGS}"
361CFLAGS_STLIB="${CFLAGS_STLIB:-$CFLAGS}"
362LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
363LDFLAGS_STATIC=${LDFLAGS_STATIC:-$LDFLAGS}
364AC_ARG_ENABLE([hardening],
365[ --enable-hardening build for coverage testing using gcov],
366if test "$enableval" = "yes"
367then
368 HARDEN_CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong"
369 HARDEN_LDFLAGS=["-Wl,-z,relro -Wl,-z,now"]
370 CFLAGS="$CFLAGS $HARDEN_CFLAGS -fPIE"
371 CFLAGS_SHLIB="$CFLAGS_SHLIB $HARDEN_CFLAGS"
372 CFLAGS_STLIB="$CFLAGS_STLIB $HARDEN_CFLAGS -fPIE"
373 LDFLAGS="$LDFLAGS $HARDEN_LDFLAGS -fPIE -pie"
374 LDFLAGS_STATIC="$LDFLAGS_STATIC $HARDEN_LDFLAGS"
375 LDFLAGS_SHLIB="$LDFLAGS_SHLIB $HARDEN_LDFLAGS"
376 AC_MSG_RESULT([Enabling hardening support])
377fi
378)
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000379dnl
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000380dnl Substitute library extensions
381dnl
382AC_SUBST(LIB_EXT)
383AC_SUBST(STATIC_LIB_EXT)
384AC_SUBST(PROFILED_LIB_EXT)
Theodore Ts'o55da9872008-09-02 23:12:38 -0400385AC_SUBST(LDFLAG_DYNAMIC)
386AC_SUBST(PRIVATE_LIBS_CMT)
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000387dnl
Theodore Ts'o782bebf2002-11-08 18:46:45 -0500388dnl handle --enable-jbd-debug
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000389dnl
Theodore Ts'o782bebf2002-11-08 18:46:45 -0500390AC_ARG_ENABLE([jbd-debug],
391[ --enable-jbd-debug enable journal debugging],
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000392if test "$enableval" = "no"
393then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400394 AC_MSG_RESULT([Disabling journal debugging])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000395else
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400396 AC_DEFINE(CONFIG_JBD_DEBUG, 1,
397 [Define to 1 if debugging ext3/4 journal code])
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400398 AC_MSG_RESULT([Enabling journal debugging])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000399fi
400,
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400401AC_MSG_RESULT([Disabling journal debugging by default])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000402)
403dnl
Theodore Ts'of0a22d02003-02-22 13:19:53 -0500404dnl handle --enable-blkid-debug
405dnl
406AC_ARG_ENABLE([blkid-debug],
Theodore Ts'od21ae6c2003-05-05 09:00:24 -0400407[ --enable-blkid-debug enable blkid debugging],
Theodore Ts'of0a22d02003-02-22 13:19:53 -0500408if test "$enableval" = "no"
409then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400410 AC_MSG_RESULT([Disabling blkid debugging])
Theodore Ts'of0a22d02003-02-22 13:19:53 -0500411else
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400412 AC_DEFINE(CONFIG_BLKID_DEBUG, 1,
413 [Define to 1 if debugging the blkid library])
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400414 AC_MSG_RESULT([Enabling blkid debugging])
Theodore Ts'of0a22d02003-02-22 13:19:53 -0500415fi
416,
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400417AC_MSG_RESULT([Disabling blkid debugging by default])
Theodore Ts'of0a22d02003-02-22 13:19:53 -0500418)
419dnl
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400420dnl handle --enable-testio-debug
421dnl
422AC_ARG_ENABLE([testio-debug],
Theodore Ts'oaf773652008-09-01 11:27:27 -0400423[ --disable-testio-debug disable the use of the test I/O manager for debugging],
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400424AH_TEMPLATE([CONFIG_TESTIO_DEBUG],
425 [Define to 1 if the testio I/O manager should be enabled])
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400426if test "$enableval" = "no"
427then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400428 AC_MSG_RESULT([Disabling testio debugging])
Theodore Ts'oaf773652008-09-01 11:27:27 -0400429 TEST_IO_CMT="#"
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400430else
Theodore Ts'oaf773652008-09-01 11:27:27 -0400431 TEST_IO_CMT=
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400432 AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400433 AC_MSG_RESULT([Enabling testio debugging])
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400434fi
435,
Theodore Ts'oaf773652008-09-01 11:27:27 -0400436AC_MSG_RESULT([Enabling testio debugging by default])
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400437AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
Theodore Ts'oaf773652008-09-01 11:27:27 -0400438TEST_IO_CMT=
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400439)
Theodore Ts'oaf773652008-09-01 11:27:27 -0400440AC_SUBST(TEST_IO_CMT)
Theodore Ts'o2a29f132003-05-05 12:08:47 -0400441dnl
Scott James Remnant39fd3d42009-05-14 13:03:25 +0100442dnl handle --disable-libuuid
443dnl
444PKG_PROG_PKG_CONFIG
445LIBUUID=
446DEPLIBUUID=
447STATIC_LIBUUID=
448DEPSTATIC_LIBUUID=
449PROFILED_LIBUUID=
450DEPPROFILED_LIBUUID=
451UUID_CMT=
452AC_ARG_ENABLE([libuuid],
Theodore Ts'of5dffb82015-06-20 14:20:14 -0400453[ --enable-libuuid build and use private uuid library],
Scott James Remnant39fd3d42009-05-14 13:03:25 +0100454if test "$enableval" = "no"
455then
456 if test -z "$PKG_CONFIG"; then
457 AC_MSG_ERROR([pkg-config not installed; please install it.])
458 fi
459
460 AC_CHECK_LIB(uuid, uuid_generate,
461 [LIBUUID=`$PKG_CONFIG --libs uuid`;
462 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`],
Theodore Ts'o2d7583b2014-07-05 00:27:02 -0400463 [AC_MSG_ERROR([external uuid library not found])])
Theodore Ts'o5afdf372014-09-18 21:11:33 -0400464 PROFILED_LIBUUID=$LIBUUID
Scott James Remnant39fd3d42009-05-14 13:03:25 +0100465 UUID_CMT=#
466 AC_MSG_RESULT([Disabling private uuid library])
467else
468 LIBUUID='$(LIB)/libuuid'$LIB_EXT
469 DEPLIBUUID=$LIBUUID
470 STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
471 DEPSTATIC_LIBUUID=$STATIC_LIBUUID
472 PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
473 DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
474 AC_MSG_RESULT([Enabling private uuid library])
475fi
476,
Theodore Ts'of5dffb82015-06-20 14:20:14 -0400477if test -n "$PKG_CONFIG"; then
478 AC_CHECK_LIB(uuid, uuid_generate,
479 [LIBUUID=`$PKG_CONFIG --libs uuid`;
480 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`])
481fi
482if test -n "$LIBUUID"; then
483 PROFILED_LIBUUID=$LIBUUID
484 UUID_CMT=#
485 AC_MSG_RESULT([Using system uuid by default])
486else
487 LIBUUID='$(LIB)/libuuid'$LIB_EXT
488 DEPLIBUUID=$LIBUUID
489 STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
490 DEPSTATIC_LIBUUID=$STATIC_LIBUUID
491 PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
492 DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
493 AC_MSG_RESULT([Enabling private uuid library by default])
494fi
Scott James Remnant39fd3d42009-05-14 13:03:25 +0100495)
496AC_SUBST(LIBUUID)
497AC_SUBST(DEPLIBUUID)
498AC_SUBST(STATIC_LIBUUID)
499AC_SUBST(DEPSTATIC_LIBUUID)
500AC_SUBST(PROFILED_LIBUUID)
501AC_SUBST(DEPPROFILED_LIBUUID)
502AC_SUBST(UUID_CMT)
503dnl
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400504dnl handle --disable-libblkid
505dnl
506PKG_PROG_PKG_CONFIG
507LIBBLKID=
508DEPLIBBLKID=
509STATIC_LIBBLKID=
510DEPSTATIC_LIBBLKID=
511PROFILED_LIBBLKID=
512DEPPROFILED_LIBBLKID=
513BLKID_CMT=
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400514AH_TEMPLATE([CONFIG_BUILD_FINDFS], [Define to 1 to compile findfs])
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400515AC_ARG_ENABLE([libblkid],
Theodore Ts'of5dffb82015-06-20 14:20:14 -0400516[ --enable-libblkid build and use private blkid library],
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400517if test "$enableval" = "no"
518then
519 if test -z "$PKG_CONFIG"; then
520 AC_MSG_ERROR([pkg-config not installed; please install it.])
521 fi
522
523 AC_CHECK_LIB(blkid, blkid_get_cache,
524 [LIBBLKID=`$PKG_CONFIG --libs blkid`;
525 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
Theodore Ts'o2d7583b2014-07-05 00:27:02 -0400526 [AC_MSG_ERROR([external blkid library not found])], -luuid)
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400527 BLKID_CMT=#
Theodore Ts'o5afdf372014-09-18 21:11:33 -0400528 PROFILED_LIBBLKID=$LIBBLKID
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400529 AC_MSG_RESULT([Disabling private blkid library])
530else
531 LIBBLKID='$(LIB)/libblkid'$LIB_EXT
532 DEPLIBBLKID=$LIBBLKID
533 STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
534 DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
535 PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
536 DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400537 AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400538 AC_MSG_RESULT([Enabling private blkid library])
539fi
540,
Theodore Ts'of5dffb82015-06-20 14:20:14 -0400541if test -n "$PKG_CONFIG"; then
542 AC_CHECK_LIB(blkid, blkid_get_cache,
543 [LIBBLKID=`$PKG_CONFIG --libs blkid`;
544 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`])
545fi
546if test -n "$LIBBLKID"; then
547 BLKID_CMT=#
548 PROFILED_LIBBLKID=$LIBBLKID
549 AC_MSG_RESULT([Using system blkid library by default])
550else
551 LIBBLKID='$(LIB)/libblkid'$LIB_EXT
552 DEPLIBBLKID=$LIBBLKID
553 STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
554 DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
555 PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
556 DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
557 AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
558 AC_MSG_RESULT([Enabling private blkid library by default])
559fi
Theodore Ts'o14b596d2009-04-22 09:18:30 -0400560)
561AC_SUBST(LIBBLKID)
562AC_SUBST(DEPLIBBLKID)
563AC_SUBST(STATIC_LIBBLKID)
564AC_SUBST(DEPSTATIC_LIBBLKID)
565AC_SUBST(PROFILED_LIBBLKID)
566AC_SUBST(DEPPROFILED_LIBBLKID)
567AC_SUBST(BLKID_CMT)
568dnl
Theodore Ts'o3df60142013-06-16 16:14:40 -0400569dnl handle --disable-backtrace
570dnl
571AH_TEMPLATE([DISABLE_BACKTRACE], [Define to 1 to disable use of backtrace])
572AC_ARG_ENABLE([backtrace],
573[ --disable-backtrace disable use backtrace],
574if test "$enableval" = "no"
575then
576 AC_MSG_RESULT([Disabling use of backtrace])
577 AC_DEFINE(DISABLE_BACKTRACE, 1)
578else
579 AC_MSG_RESULT([Enabling use of backtrace])
580fi
581,
582AC_MSG_RESULT([Enabling use of backtrace by default])
583)
584dnl
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000585dnl handle --enable-debugfs
586dnl
587AC_ARG_ENABLE([debugfs],
588[ --disable-debugfs disable support of debugfs program],
589if test "$enableval" = "no"
590then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400591 AC_MSG_RESULT([Disabling debugfs support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000592 DEBUGFS_CMT="#"
593else
594 DEBUGFS_CMT=
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400595 AC_MSG_RESULT([Enabling debugfs support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000596fi
597,
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400598AC_MSG_RESULT([Enabling debugfs support by default])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000599DEBUGFS_CMT=
600)
601AC_SUBST(DEBUGFS_CMT)
602dnl
603dnl handle --enable-imager
604dnl
605AC_ARG_ENABLE([imager],
606[ --disable-imager disable support of e2image program],
607if test "$enableval" = "no"
608then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400609 AC_MSG_RESULT([Disabling e2image support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000610 IMAGER_CMT="#"
611else
612 IMAGER_CMT=
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400613 AC_MSG_RESULT([Enabling e2image support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000614fi
615,
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400616AC_MSG_RESULT([Enabling e2image support by default])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000617IMAGER_CMT=
618)
619AC_SUBST(IMAGER_CMT)
620dnl
621dnl handle --enable-resizer
622dnl
623AC_ARG_ENABLE([resizer],
624[ --disable-resizer disable support of e2resize program],
625if test "$enableval" = "no"
626then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400627 AC_MSG_RESULT([Disabling e2resize support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000628 RESIZER_CMT="#"
629else
630 RESIZER_CMT=
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400631 AC_MSG_RESULT([Enabling e2resize support])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000632fi
633,
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400634AC_MSG_RESULT([Enabling e2resize support by default])
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000635RESIZER_CMT=
636)
637AC_SUBST(RESIZER_CMT)
638dnl
Theodore Ts'o8d9c50c2010-12-24 15:19:44 -0500639dnl handle --enable-defrag
640dnl
641AC_ARG_ENABLE([defrag],
642[ --disable-defrag disable support of e4defrag program],
643if test "$enableval" = "no"
644then
645 AC_MSG_RESULT([Disabling e4defrag support])
646 DEFRAG_CMT="#"
647else
648 DEFRAG_CMT=
649 AC_MSG_RESULT([Enabling e4defrag support])
650fi
651,
Theodore Ts'o6c59a662014-01-04 20:44:29 -0500652if test -z "$WITH_DIET_LIBC"
653then
654 AC_MSG_RESULT([Enabling e4defrag support by default])
655 DEFRAG_CMT=
656else
657 AC_MSG_RESULT([Disabling e4defrag support by default])
658 DEFRAG_CMT="#"
659fi
Theodore Ts'o8d9c50c2010-12-24 15:19:44 -0500660)
661AC_SUBST(DEFRAG_CMT)
662dnl
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000663dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
664dnl
665AC_ARG_ENABLE([fsck],
666[ --enable-fsck build fsck wrapper program],
667[if test "$enableval" = "no"
668then
669 FSCK_PROG='' FSCK_MAN=''
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400670 AC_MSG_RESULT([Not building fsck wrapper])
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000671else
672 FSCK_PROG=fsck FSCK_MAN=fsck.8
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400673 AC_MSG_RESULT([Building fsck wrapper])
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000674fi]
675,
676[case "$host_os" in
Theodore Ts'oe3632402004-05-04 19:39:54 -0400677 gnu*)
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000678 FSCK_PROG='' FSCK_MAN=''
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400679 AC_MSG_RESULT([Not building fsck wrapper by default])
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000680 ;;
681 *)
682 FSCK_PROG=fsck FSCK_MAN=fsck.8
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400683 AC_MSG_RESULT([Building fsck wrapper by default])
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000684esac]
685)
686AC_SUBST(FSCK_PROG)
687AC_SUBST(FSCK_MAN)
688dnl
Theodore Ts'o5d407732004-09-18 14:53:14 -0400689dnl See whether to install the `e2initrd-helper' program
690dnl
691AC_ARG_ENABLE([e2initrd-helper],
692[ --enable-e2initrd-helper build e2initrd-helper program],
693[if test "$enableval" = "no"
694then
695 E2INITRD_PROG='' E2INITRD_MAN=''
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400696 AC_MSG_RESULT([Not building e2initrd helper])
Theodore Ts'o5d407732004-09-18 14:53:14 -0400697else
698 E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400699 AC_MSG_RESULT([Building e2initrd helper])
Theodore Ts'o5d407732004-09-18 14:53:14 -0400700fi]
701,
702E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400703AC_MSG_RESULT([Building e2initrd helper by default])
Theodore Ts'o5d407732004-09-18 14:53:14 -0400704)
705AC_SUBST(E2INITRD_PROG)
706AC_SUBST(E2INITRD_MAN)
Karel Zak4db2f592006-03-08 14:17:28 -0500707dnl
Theodore Ts'o5d407732004-09-18 14:53:14 -0400708dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000709dnl
Theodore Ts'o32493942007-12-31 10:45:01 -0500710AC_ARG_ENABLE([tls],
711[ --disable-tls disable use of thread local support],
712[if test "$enableval" = "no"
713then
714 try_tls=""
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400715 AC_MSG_RESULT([Disabling thread local support])
Theodore Ts'o32493942007-12-31 10:45:01 -0500716else
717 try_tls="yes"
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400718 AC_MSG_RESULT([Enabling thread local support])
Theodore Ts'o32493942007-12-31 10:45:01 -0500719fi]
720,
Theodore Ts'oeafba6c2008-07-10 10:21:42 -0400721if test -n "$WITH_DIET_LIBC"
722then
723 try_tls=""
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400724 AC_MSG_RESULT([Diet libc does not support thread local support])
Theodore Ts'oeafba6c2008-07-10 10:21:42 -0400725else
726 try_tls="yes"
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400727 AC_MSG_RESULT([Try using thread local support by default])
Theodore Ts'oeafba6c2008-07-10 10:21:42 -0400728fi
Theodore Ts'o32493942007-12-31 10:45:01 -0500729)
730if test "$try_tls" = "yes"
731then
732AX_TLS
733fi
734dnl
735dnl
736dnl
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400737AH_TEMPLATE([USE_UUIDD], [Define to 1 to build uuidd])
Theodore Ts'o5610f992007-12-31 11:16:56 -0500738AC_ARG_ENABLE([uuidd],
739[ --disable-uuidd disable building the uuid daemon],
740[if test "$enableval" = "no"
741then
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400742 AC_MSG_RESULT([Not building uuidd])
Theodore Ts'o5610f992007-12-31 11:16:56 -0500743 UUIDD_CMT="#"
744else
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400745 AC_DEFINE(USE_UUIDD, 1)
Theodore Ts'o5610f992007-12-31 11:16:56 -0500746 UUIDD_CMT=""
Theodore Ts'o02d04db2008-08-22 10:52:42 -0400747 AC_MSG_RESULT([Building uuidd])
Theodore Ts'o5610f992007-12-31 11:16:56 -0500748fi]
749,
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400750AC_DEFINE(USE_UUIDD, 1)
Theodore Ts'oe3d10152014-09-19 00:26:26 -0400751if test -z "$UUID_CMT"
752then
753 UUIDD_CMT=""
754 AC_MSG_RESULT([Building uuidd by default])
755else
756 UUIDD_CMT="#"
757 AC_MSG_RESULT([Disabling uuidd by default])
758fi
Theodore Ts'o5610f992007-12-31 11:16:56 -0500759)
760AC_SUBST(UUIDD_CMT)
761dnl
Tony Breedsd6a4bcb2012-06-26 11:42:15 +1000762dnl handle --disable-mmp
763dnl
764AH_TEMPLATE([CONFIG_MMP], [Define to 1 to enable mmp support])
765AC_ARG_ENABLE([mmp],
766[ --disable-mmp disable support mmp, Multi Mount Protection],
767if test "$enableval" = "no"
768then
769 AC_MSG_RESULT([Disabling mmp support])
770else
771 AC_MSG_RESULT([Enabling mmp support])
772 AC_DEFINE(CONFIG_MMP, 1)
773fi
774,
775AC_MSG_RESULT([Enabling mmp support by default])
776AC_DEFINE(CONFIG_MMP, 1)
777)
778dnl
Theodore Ts'o749f0712016-05-29 20:48:54 -0400779dnl handle --disable-tdb
780dnl
781AH_TEMPLATE([CONFIG_TDB], [Define to 1 to enable tdb support])
782AC_ARG_ENABLE([tdb],
783[ --disable-tdb disable tdb support],
784if test "$enableval" = "no"
785then
786 AC_MSG_RESULT([Disabling tdb support])
787 TDB_CMT="#"
788 TDB_MAN_COMMENT='.\"'
789else
790 AC_MSG_RESULT([Enabling tdb support])
791 AC_DEFINE(CONFIG_TDB, 1)
792 TDB_CMT=""
793 TDB_MAN_COMMENT=""
794fi
795,
796AC_MSG_RESULT([Enabling mmp support by default])
797AC_DEFINE(CONFIG_TDB, 1)
798TDB_CMT=""
799TDB_MAN_COMMENT=""
800)
801AC_SUBST(TDB_CMT)
802AC_SUBST(TDB_MAN_COMMENT)
803dnl
Tony Breeds1625bf42012-07-30 14:44:12 -0400804dnl handle --disable-bmap-stats
805dnl
806AH_TEMPLATE([ENABLE_BMAP_STATS], [Define to 1 to enable bitmap stats.])
807AC_ARG_ENABLE([bmap-stats],
808[ --disable-bmap-stats disable collection of bitmap stats.],
809if test "$enableval" = "no"
810then
811 AC_MSG_RESULT([Disabling bitmap statistics support])
812else
813 AC_MSG_RESULT([Enabling bitmap statistics support])
814 AC_DEFINE(ENABLE_BMAP_STATS, 1)
815fi
816,
817AC_MSG_RESULT([Enabling bitmap statistics support by default])
818AC_DEFINE(ENABLE_BMAP_STATS, 1)
819)
820dnl
821dnl handle --enable-bmap-stats-ops
822dnl
823AH_TEMPLATE([ENABLE_BMAP_STATS_OPS], [Define to 1 to enable bitmap stats.])
824AC_ARG_ENABLE([bmap-stats-ops],
825[ --enable-bmap-stats-ops enable collection of additional bitmap stats],
826if test "$enableval" = "no"
827then
828 AC_MSG_RESULT([Disabling additional bitmap statistics])
829else
830 dnl There has to be a better way!
831 AS_IF([test "x${enable_bmap_stats}" = "xno"],
832 AC_MSG_FAILURE([Error --enable-bmap-stats-ops requires bmap-stats]))
833
834 AC_MSG_RESULT([Enabling additional bitmap statistics])
835 AC_DEFINE(ENABLE_BMAP_STATS_OPS, 1)
836fi
837,
838AC_MSG_RESULT([Disabling additional bitmap statistics by default])
839)
840dnl
Theodore Ts'o5610f992007-12-31 11:16:56 -0500841dnl
842dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000843MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
844AC_SUBST_FILE(MAKEFILE_LIBRARY)
845dnl
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000846dnl Add internationalization support, using gettext.
847dnl
Theodore Ts'ob0cacab2004-11-30 19:00:19 -0500848GETTEXT_PACKAGE=e2fsprogs
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000849PACKAGE=e2fsprogs
850VERSION="$E2FSPROGS_VERSION"
Theodore Ts'ob0cacab2004-11-30 19:00:19 -0500851VERSION=0.14.1
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400852AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name for gettext])
853AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version for gettext])
Theodore Ts'ob0cacab2004-11-30 19:00:19 -0500854AC_SUBST(GETTEXT_PACKAGE)
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000855AC_SUBST(PACKAGE)
856AC_SUBST(VERSION)
857
Theodore Ts'ocdf186e2001-06-13 22:16:47 +0000858AM_GNU_GETTEXT
859dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000860dnl End of configuration options
861dnl
Theodore Ts'o74becf31997-04-26 14:37:06 +0000862AC_SUBST(BINARY_TYPE)
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000863AC_PROG_MAKE_SET
Theodore Ts'obcb915b2009-07-02 18:19:10 -0400864CHECK_GNU_MAKE
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000865AC_PATH_PROG(LN, ln, ln)
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000866AC_PROG_LN_S
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000867AC_PATH_PROG(MV, mv, mv)
868AC_PATH_PROG(CP, cp, cp)
869AC_PATH_PROG(RM, rm, rm)
870AC_PATH_PROG(CHMOD, chmod, :)
Theodore Ts'o32237012005-01-17 19:13:39 -0500871AC_PROG_AWK
872AC_PROG_EGREP
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000873AC_PATH_PROG(SED, sed, sed)
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000874AC_PATH_PROG(PERL, perl, perl)
Theodore Ts'o250f79f2001-05-19 22:02:22 +0000875AC_PATH_PROG(LDCONFIG, ldconfig, :)
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000876AC_CHECK_TOOL(AR, ar, ar)
877AC_CHECK_TOOL(RANLIB, ranlib, :)
878AC_CHECK_TOOL(STRIP, strip, :)
Manish Katiyar7321d942008-04-14 17:20:03 +0530879AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
880if test "_$MAKEINFO" = "_"; then
Theodore Ts'oca1de982016-09-11 23:30:25 -0400881 MAKEINFO="echo Makeinfo is missing. Info documentation will not be built."
Manish Katiyar7321d942008-04-14 17:20:03 +0530882else
883 case "$MAKEINFO" in
884 */missing.*)
885 AC_MSG_WARN([
886*** Makeinfo is missing. Info documentation will not be built.])
887 ;;
888 *)
889 ;;
890 esac
891fi
892AC_SUBST(MAKEINFO)
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000893AC_PROG_INSTALL
Theodore Ts'o6c133521999-07-03 20:37:03 +0000894# See if we need a separate native compiler.
895if test $cross_compiling = no; then
896 BUILD_CC="$CC"
897 AC_SUBST(BUILD_CC)
898else
899 AC_CHECK_PROGS(BUILD_CC, gcc cc)
900fi
Mike Frysinger677fc912012-03-06 20:13:54 -0500901AC_CHECK_HEADERS(m4_flatten([
902 dirent.h
903 errno.h
904 execinfo.h
905 getopt.h
906 malloc.h
907 mntent.h
908 paths.h
909 semaphore.h
910 setjmp.h
911 signal.h
912 stdarg.h
913 stdint.h
914 stdlib.h
915 termios.h
916 termio.h
917 unistd.h
918 utime.h
Ross Burtonc84da2e2014-07-10 17:44:38 +0100919 attr/xattr.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500920 linux/falloc.h
921 linux/fd.h
Darrick J. Wong82424fc2017-05-15 11:37:11 -0700922 linux/fsmap.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500923 linux/major.h
Kazuya Miofbabd5c2013-12-16 00:48:12 -0500924 linux/loop.h
Adrien Schildknechtf47f3192016-11-23 10:21:42 -0800925 linux/types.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500926 net/if_dl.h
927 netinet/in.h
Darrick J. Wong81cbf1e2015-05-13 17:22:40 -0700928 sys/acl.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500929 sys/disklabel.h
Andreas Dilger51050542014-06-11 12:59:05 -0600930 sys/disk.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500931 sys/file.h
932 sys/ioctl.h
Theodore Ts'o74f2c4a2015-06-19 19:28:25 -0400933 sys/key.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500934 sys/mkdev.h
935 sys/mman.h
Andreas Dilger51050542014-06-11 12:59:05 -0600936 sys/mount.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500937 sys/prctl.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500938 sys/resource.h
939 sys/select.h
940 sys/socket.h
941 sys/sockio.h
942 sys/stat.h
943 sys/syscall.h
Darrick J. Wong79614b22015-04-20 22:27:19 -0400944 sys/sysctl.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500945 sys/sysmacros.h
946 sys/time.h
947 sys/types.h
948 sys/un.h
949 sys/wait.h
Dmitry V. Levind7de3f32017-05-18 17:46:49 +0000950 sys/xattr.h
Mike Frysinger677fc912012-03-06 20:13:54 -0500951]))
Matthias Andreeec3a69b2017-08-29 01:02:36 -0400952dnl Check where to find a dd(1) that supports iflag=fullblock
953dnl and oflag=append
954AC_MSG_CHECKING([for a dd(1) program that supports iflag=fullblock])
955DD=
956for i in dd gdd ; do
957 if "$i" if=/dev/null of=/dev/null count=1 bs=10k 2>/dev/null iflag=fullblock oflag=append ; then
958 DD=$i
959 break
960 fi
961done
962if test -n "$DD" ; then
963 AC_MSG_RESULT([$DD])
964else
965 AC_MSG_RESULT([not found, using dd])
966 DD=dd
967 AC_MSG_WARN([No GNU-compatible dd(1) program found, expect some self-test failures.])
968fi
969AC_SUBST([DD])
970
Theodore Ts'oda76d6b2005-01-18 23:29:01 -0500971AC_CHECK_HEADERS(net/if.h,,,
972[[
973#if HAVE_SYS_TYPES_H
974#include <sys/types.h>
975#endif
976#if HAVE_SYS_SOCKET
977#include <sys/socket.h>
978#endif
979]])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000980AC_FUNC_VPRINTF
Theodore Ts'offf45482003-04-13 00:44:19 -0400981dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
Sebastian Rasmussen055866d2017-10-08 13:30:08 +0200982dnl is not declared.
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400983AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
984 [Define to 1 if dirent has d_reclen])],,
Theodore Ts'o6c65d252005-01-19 12:59:48 -0500985 [#include <dirent.h>])
Theodore Ts'o28739272014-01-03 00:26:43 -0500986AC_CHECK_MEMBERS([struct stat.st_atim])
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400987dnl Check to see if ssize_t was declared
988AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T, 1,
989 [Define to 1 if ssize_t declared])],,
Theodore Ts'o6c65d252005-01-19 12:59:48 -0500990 [#include <sys/types.h>])
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000991dnl
Theodore Ts'ob0b9c4d1997-10-20 23:36:30 +0000992dnl Check to see if llseek() is declared in unistd.h. On some libc's
993dnl it is, and on others it isn't..... Thank you glibc developers....
994dnl
Theodore Ts'od1154eb2011-09-18 17:34:37 -0400995AC_CHECK_DECL(llseek,[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE, 1,
996 [Define to 1 if llseek declared in unistd.h])],,
Theodore Ts'o6c65d252005-01-19 12:59:48 -0500997 [#include <unistd.h>])
Theodore Ts'ob0b9c4d1997-10-20 23:36:30 +0000998dnl
Theodore Ts'o6928adc2000-05-25 23:28:50 +0000999dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files
1000dnl are so convoluted that I can't tell whether it will always be defined,
1001dnl and if it isn't defined while lseek64 is defined in the library,
1002dnl disaster will strike.
1003dnl
1004dnl Warning! Use of --enable-gcc-wall may throw off this test.
1005dnl
1006dnl
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001007AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE, 1,
1008 [Define to 1 if lseek64 declared in unistd.h])],,
Theodore Ts'o6c65d252005-01-19 12:59:48 -05001009 [#define _LARGEFILE_SOURCE
1010 #define _LARGEFILE64_SOURCE
1011 #include <unistd.h>])
Theodore Ts'o6928adc2000-05-25 23:28:50 +00001012dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001013dnl Word sizes...
1014dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001015AC_CHECK_SIZEOF(short)
1016AC_CHECK_SIZEOF(int)
1017AC_CHECK_SIZEOF(long)
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001018AC_CHECK_SIZEOF(long long)
Phillip Susi274d46e2013-01-24 11:21:56 -05001019AC_CHECK_SIZEOF(off_t)
Theodore Ts'o2dd680f2016-05-29 01:07:40 -04001020AC_CHECK_SIZEOF(time_t)
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001021SIZEOF_SHORT=$ac_cv_sizeof_short
1022SIZEOF_INT=$ac_cv_sizeof_int
1023SIZEOF_LONG=$ac_cv_sizeof_long
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001024SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
Phillip Susi274d46e2013-01-24 11:21:56 -05001025SIZEOF_OFF_T=$ac_cv_sizeof_off_t
Theodore Ts'o2dd680f2016-05-29 01:07:40 -04001026SIZEOF_TIME_T=$ac_cv_sizeof_time_t
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001027AC_SUBST(SIZEOF_SHORT)
1028AC_SUBST(SIZEOF_INT)
1029AC_SUBST(SIZEOF_LONG)
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001030AC_SUBST(SIZEOF_LONG_LONG)
Phillip Susi274d46e2013-01-24 11:21:56 -05001031AC_SUBST(SIZEOF_OFF_T)
Theodore Ts'o2dd680f2016-05-29 01:07:40 -04001032AC_SUBST(SIZEOF_TIME_T)
Theodore Ts'o877eb6d2001-06-11 06:54:13 +00001033AC_C_BIGENDIAN
Chen Qi91f04682014-05-05 21:08:42 -04001034if test $cross_compiling = no; then
1035 BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
1036else
1037 CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
1038fi
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -04001039ASM_TYPES_HEADER=./asm_types.h
1040AC_SUBST_FILE(ASM_TYPES_HEADER)
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001041dnl
Theodore Ts'o488c75a2008-06-07 08:55:21 -04001042dnl Save the configuration #defines needed for the public ext2fs.h
1043dnl header file
1044dnl
1045echo "/* These defines are needed for the public ext2fs.h header file */" \
1046 > public_config.h
1047if grep HAVE_SYS_TYPES_H confdefs.h > tmp_config.$$; then
1048 uniq tmp_config.$$ >> public_config.h
1049else
1050 echo "#undef HAVE_SYS_TYPES_H" >> public_config.h
1051fi
1052if grep WORDS_BIGENDIAN confdefs.h > tmp_config.$$; then
1053 uniq tmp_config.$$ >> public_config.h
1054else
1055 echo "#undef WORDS_BIGENDIAN" >> public_config.h
1056fi
1057rm -f tmp_config.$$
1058PUBLIC_CONFIG_HEADER=./public_config.h
1059AC_SUBST_FILE(PUBLIC_CONFIG_HEADER)
1060dnl
Theodore Ts'o0c193f82003-08-01 14:26:23 -04001061dnl See if we have inttypes.h and if intptr_t is defined
1062dnl
1063AC_CHECK_HEADERS([inttypes.h])
Theodore Ts'od2ee56d2005-01-09 00:57:45 -05001064AC_CHECK_TYPES(intptr_t)
Theodore Ts'o0c193f82003-08-01 14:26:23 -04001065dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001066dnl See if struct stat has a st_flags field, in which case we can get file
1067dnl flags somewhat portably. Also check for the analogous setter, chflags().
1068dnl
1069AC_MSG_CHECKING(whether struct stat has a st_flags field)
1070AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags,
1071 AC_TRY_COMPILE([#include <sys/stat.h>],
1072 [struct stat stat; stat.st_flags = 0;],
1073 [e2fsprogs_cv_struct_st_flags=yes],
1074 [e2fsprogs_cv_struct_st_flags=no]))
1075AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
1076if test "$e2fsprogs_cv_struct_st_flags" = yes; then
Theodore Ts'oc03bc4e1999-10-20 18:20:36 +00001077 AC_MSG_CHECKING(whether st_flags field is useful)
1078 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut,
1079 AC_TRY_COMPILE([#include <sys/stat.h>],
1080 [struct stat stat; stat.st_flags |= UF_IMMUTABLE;],
1081 [e2fsprogs_cv_struct_st_flags_immut=yes],
1082 [e2fsprogs_cv_struct_st_flags_immut=no]))
1083 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
1084 if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001085 AC_DEFINE(HAVE_STAT_FLAGS, 1,
1086 [Define to 1 if struct stat has st_flags])
Theodore Ts'oc03bc4e1999-10-20 18:20:36 +00001087 fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001088fi
Theodore Ts'o84ea6e72004-03-19 19:29:17 -05001089dnl
1090dnl Check for the presence of SA_LEN
1091dnl
Theodore Ts'o6c65d252005-01-19 12:59:48 -05001092AC_CHECK_MEMBER(struct sockaddr.sa_len,
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001093 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,
1094 [Define to 1 if if struct sockaddr contains sa_len]),,
Theodore Ts'o6c65d252005-01-19 12:59:48 -05001095 [#include <sys/types.h>
1096 #include <sys/socket.h>])
Theodore Ts'o84ea6e72004-03-19 19:29:17 -05001097dnl
Eric Sandeen9ed8e5f2009-10-02 11:32:42 -05001098dnl This will add -lblkid to the AC_CHECK_FUNCS search if we are using
1099dnl the system-provided blkid library
1100dnl
1101if test -n "$BLKID_CMT"; then
1102 AC_SEARCH_LIBS([blkid_probe_all], [blkid])
1103fi
1104dnl
Theodore Ts'o32179ce2016-06-07 00:14:35 -04001105if test -n "$DLOPEN_LIB" ; then
1106 ac_cv_func_dlopen=yes
1107fi
Mike Frysinger677fc912012-03-06 20:13:54 -05001108AC_CHECK_FUNCS(m4_flatten([
1109 __secure_getenv
Theodore Ts'o74f2c4a2015-06-19 19:28:25 -04001110 add_key
Mike Frysinger677fc912012-03-06 20:13:54 -05001111 backtrace
1112 blkid_probe_get_topology
Theodore Ts'o2de26282014-05-05 01:22:22 -04001113 blkid_probe_enable_partitions
Mike Frysinger677fc912012-03-06 20:13:54 -05001114 chflags
Theodore Ts'o32179ce2016-06-07 00:14:35 -04001115 dlopen
Baruch Siach9a393892014-01-02 13:05:37 -05001116 fadvise64
Mike Frysinger677fc912012-03-06 20:13:54 -05001117 fallocate
1118 fallocate64
1119 fchown
Adrien Schildknechtf47f3192016-11-23 10:21:42 -08001120 fcntl
Mike Frysinger677fc912012-03-06 20:13:54 -05001121 fdatasync
1122 fstat64
Adrien Schildknechtf47f3192016-11-23 10:21:42 -08001123 fsync
Mike Frysinger677fc912012-03-06 20:13:54 -05001124 ftruncate64
Theodore Ts'o28739272014-01-03 00:26:43 -05001125 futimes
Theodore Ts'o6c59a662014-01-04 20:44:29 -05001126 getcwd
Mike Frysinger677fc912012-03-06 20:13:54 -05001127 getdtablesize
Shuichi Ihara32b88022018-05-01 22:26:06 -06001128 gethostname
Mike Frysinger677fc912012-03-06 20:13:54 -05001129 getmntinfo
Theodore Ts'o25ff7722012-04-05 15:16:50 -07001130 getpwuid_r
Mike Frysinger677fc912012-03-06 20:13:54 -05001131 getrlimit
1132 getrusage
1133 jrand48
Theodore Ts'o74f2c4a2015-06-19 19:28:25 -04001134 keyctl
Ross Burtonc84da2e2014-07-10 17:44:38 +01001135 llistxattr
Mike Frysinger677fc912012-03-06 20:13:54 -05001136 llseek
1137 lseek64
1138 mallinfo
1139 mbstowcs
1140 memalign
Theodore Ts'o6c59a662014-01-04 20:44:29 -05001141 mempcpy
Mike Frysinger677fc912012-03-06 20:13:54 -05001142 mmap
1143 msync
1144 nanosleep
1145 open64
1146 pathconf
1147 posix_fadvise
Baruch Siach9a393892014-01-02 13:05:37 -05001148 posix_fadvise64
Mike Frysinger677fc912012-03-06 20:13:54 -05001149 posix_memalign
1150 prctl
Darrick J. Wongbaa35442014-08-02 19:18:03 -04001151 pread
1152 pwrite
Theodore Ts'of00948a2014-08-08 16:42:05 -04001153 pread64
1154 pwrite64
Theodore Ts'o1ad31742013-06-16 14:34:59 -04001155 secure_getenv
Theodore Ts'ob24efa22012-04-05 15:31:09 -07001156 setmntent
Mike Frysinger677fc912012-03-06 20:13:54 -05001157 setresgid
1158 setresuid
Theodore Ts'oc42de752014-07-08 20:02:48 -04001159 snprintf
Mike Frysinger677fc912012-03-06 20:13:54 -05001160 srandom
Theodore Ts'o6c59a662014-01-04 20:44:29 -05001161 stpcpy
Mike Frysinger677fc912012-03-06 20:13:54 -05001162 strcasecmp
1163 strdup
1164 strnlen
1165 strptime
1166 strtoull
1167 sync_file_range
1168 sysconf
1169 usleep
1170 utime
Theodore Ts'o441eb332014-10-19 22:02:48 -04001171 utimes
Mike Frysinger677fc912012-03-06 20:13:54 -05001172 valloc
1173]))
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001174dnl
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001175dnl Check to see if -lsocket is required (solaris) to make something
1176dnl that uses socket() to compile; this is needed for the UUID library
1177dnl
1178SOCKET_LIB=''
1179AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
1180AC_SUBST(SOCKET_LIB)
1181dnl
Darrick J. Wongb291c112014-09-13 15:12:46 -07001182dnl See if libmagic exists
1183dnl
1184AC_CHECK_LIB(magic, magic_file, [MAGIC_LIB=-lmagic
1185AC_CHECK_HEADERS([magic.h])])
Theodore Ts'o32179ce2016-06-07 00:14:35 -04001186if test "$ac_cv_func_dlopen" = yes ; then
Theodore Ts'od2e3c0d2014-09-21 01:25:58 -04001187 MAGIC_LIB=$DLOPEN_LIB
1188fi
Darrick J. Wongb291c112014-09-13 15:12:46 -07001189AC_SUBST(MAGIC_LIB)
1190dnl
Gustavo Zacarias62bc2432016-06-09 16:56:15 -04001191dnl Check to see if librt is required for clock_gettime() (glibc < 2.17)
1192dnl
1193AC_CHECK_LIB(rt, clock_gettime, [CLOCK_GETTIME_LIB=-lrt])
1194AC_SUBST(CLOCK_GETTIME_LIB)
1195dnl
Darrick J. Wong81cbf1e2015-05-13 17:22:40 -07001196dnl Check to see if the FUSE library is -lfuse or -losxfuse
1197dnl
1198FUSE_CMT=
1199FUSE_LIB=
1200dnl osxfuse.dylib supersedes fuselib.dylib
1201AC_ARG_ENABLE([fuse2fs],
Theodore Ts'of5dffb82015-06-20 14:20:14 -04001202[ --disable-fuse2fs do not build fuse2fs],
Darrick J. Wong81cbf1e2015-05-13 17:22:40 -07001203if test "$enableval" = "no"
1204then
1205 FUSE_CMT="#"
1206 AC_MSG_RESULT([Disabling fuse2fs])
1207else
1208 AC_CHECK_HEADERS([pthread.h fuse.h], [],
1209[AC_MSG_FAILURE([Cannot find fuse2fs headers.])],
1210[#define _FILE_OFFSET_BITS 64
1211#define FUSE_USE_VERSION 29])
1212
1213 AC_PREPROC_IFELSE(
1214[AC_LANG_PROGRAM([[#define FUSE_USE_VERSION 29
1215#ifdef __linux__
1216#include <linux/fs.h>
1217#include <linux/falloc.h>
1218#include <linux/xattr.h>
1219#endif
1220]], [])], [], [AC_MSG_FAILURE([Cannot find fuse2fs Linux headers.])])
1221
1222 AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse],
1223 [AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse],
1224 [AC_MSG_FAILURE([Cannot find fuse library.])])])
1225 AC_MSG_RESULT([Enabling fuse2fs])
1226fi
1227,
1228AC_CHECK_HEADERS([pthread.h fuse.h], [], [FUSE_CMT="#"],
1229[#define _FILE_OFFSET_BITS 64
1230#define FUSE_USE_VERSION 29
1231#ifdef __linux__
1232# include <linux/fs.h>
1233# include <linux/falloc.h>
1234# include <linux/xattr.h>
1235#endif])
1236if test -z "$FUSE_CMT"
1237then
1238 AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse],
1239[AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse], [FUSE_CMT="#"])])
1240fi
1241if test -z "$FUSE_CMT"
1242then
1243 AC_MSG_RESULT([Enabling fuse2fs by default.])
1244fi
1245)
1246AC_SUBST(FUSE_LIB)
1247AC_SUBST(FUSE_CMT)
1248dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001249dnl See if optreset exists
1250dnl
1251AC_MSG_CHECKING(for optreset)
1252AC_CACHE_VAL(ac_cv_have_optreset,
1253[AC_EGREP_HEADER(optreset, unistd.h,
1254 ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl
1255AC_MSG_RESULT($ac_cv_have_optreset)
1256if test $ac_cv_have_optreset = yes; then
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001257 AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if optreset for getopt is present])
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001258fi
1259dnl
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001260dnl Test for sem_init, and which library it might require:
1261dnl
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001262AH_TEMPLATE([HAVE_SEM_INIT], [Define to 1 if sem_init() exists])
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001263SEM_INIT_LIB=''
Theodore Ts'ocfb8e0b2017-07-27 19:43:00 -04001264echo GL_THREADS_API: ${gl_threads_api}
1265if test "${gl_threads_api}" != none
1266then
1267 AC_CHECK_FUNC(sem_init, ,
1268 AC_CHECK_LIB(pthread, sem_init,
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001269 AC_DEFINE(HAVE_SEM_INIT, 1)
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001270 SEM_INIT_LIB=-lpthread,
Theodore Ts'ocfb8e0b2017-07-27 19:43:00 -04001271 AC_CHECK_LIB(rt, sem_init,
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001272 AC_DEFINE(HAVE_SEM_INIT, 1)
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001273 SEM_INIT_LIB=-lrt,
Theodore Ts'ocfb8e0b2017-07-27 19:43:00 -04001274 AC_CHECK_LIB(posix4, sem_init,
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001275 AC_DEFINE(HAVE_SEM_INIT, 1)
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001276 SEM_INIT_LIB=-lposix4))))dnl
Theodore Ts'ocfb8e0b2017-07-27 19:43:00 -04001277fi
Theodore Ts'od7f45af2008-09-12 10:15:26 -04001278AC_SUBST(SEM_INIT_LIB)
1279dnl
Theodore Ts'oe54635d2006-08-06 14:33:13 -04001280dnl Check for unified diff
1281dnl
1282AC_MSG_CHECKING(for unified diff option)
Theodore Ts'o27f991b2008-04-01 20:32:55 -04001283if diff -u $0 $0 > /dev/null 2>&1 ; then
Theodore Ts'oe54635d2006-08-06 14:33:13 -04001284 UNI_DIFF_OPTS=-u
1285else
1286 UNI_DIFF_OPTS=-c
1287fi
1288AC_MSG_RESULT($UNI_DIFF_OPTS)
1289AC_SUBST(UNI_DIFF_OPTS)
1290dnl
Theodore Ts'o8f3f29d2000-02-11 05:04:44 +00001291dnl We use the EXT2 ioctls only under Linux
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001292dnl
Theodore Ts'o8f3f29d2000-02-11 05:04:44 +00001293case "$host_os" in
1294linux*)
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001295 AC_DEFINE(HAVE_EXT2_IOCTLS, 1, [Define to 1 if Ext2 ioctls present])
Theodore Ts'o8f3f29d2000-02-11 05:04:44 +00001296 ;;
1297esac
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001298dnl
Theodore Ts'offf45482003-04-13 00:44:19 -04001299dnl OS-specific uncomment control
Theodore Ts'oe6f2bda2002-08-18 03:37:10 -04001300dnl
1301LINUX_CMT="#"
Theodore Ts'offf45482003-04-13 00:44:19 -04001302CYGWIN_CMT="#"
1303UNIX_CMT=
Theodore Ts'oe6f2bda2002-08-18 03:37:10 -04001304case "$host_os" in
1305linux*)
1306 LINUX_CMT=
1307 ;;
Theodore Ts'offf45482003-04-13 00:44:19 -04001308cygwin)
1309 CYGWIN_CMT=
1310 UNIX_CMT="#"
Theodore Ts'offf45482003-04-13 00:44:19 -04001311 ;;
Theodore Ts'oe6f2bda2002-08-18 03:37:10 -04001312esac
1313AC_SUBST(LINUX_CMT)
Theodore Ts'offf45482003-04-13 00:44:19 -04001314AC_SUBST(CYGWIN_CMT)
1315AC_SUBST(UNIX_CMT)
Theodore Ts'oe6f2bda2002-08-18 03:37:10 -04001316dnl
Darrick J. Wong5ce368f2018-03-23 18:57:09 -07001317dnl e2scrub only builds on linux
1318dnl
1319E2SCRUB_CMT="$LINUX_CMT"
1320AC_SUBST(E2SCRUB_CMT)
1321dnl
Theodore Ts'o6c133521999-07-03 20:37:03 +00001322dnl Linux and Hurd places root files in the / by default
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001323dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001324case "$host_os" in
Theodore Ts'o93636bd2003-07-12 02:45:05 -04001325linux* | gnu* | k*bsd*-gnu)
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001326 if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
1327 root_prefix="";
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001328 AC_MSG_RESULT([On $host_os systems, root_prefix defaults to ''])
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001329 fi
1330 ;;
1331esac
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001332dnl
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001333dnl On Linux/hurd, force the prefix to be /usr
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001334dnl
1335case "$host_os" in
Theodore Ts'o93636bd2003-07-12 02:45:05 -04001336linux* | gnu* | k*bsd*-gnu)
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00001337 if test "$prefix" = NONE ; then
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001338 prefix="/usr";
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001339 AC_MSG_RESULT([On $host_os systems, prefix defaults to /usr])
Theodore Ts'obff61a72002-05-21 22:21:38 -04001340 if test "$mandir" = '${prefix}/man' ; then
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001341 AC_MSG_RESULT([...and mandir defaults to /usr/share/man])
Theodore Ts'obff61a72002-05-21 22:21:38 -04001342 mandir=/usr/share/man
1343 fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001344 fi
1345;;
1346esac
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001347if test "$root_prefix" = NONE ; then
Theodore Ts'offe19911998-04-08 06:05:49 +00001348 if test "$prefix" = NONE ; then
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001349 root_prefix="$ac_default_prefix"
1350 else
1351 root_prefix="$prefix"
1352 fi
Theodore Ts'ob5ffead2002-05-11 19:17:00 -04001353 root_bindir=$bindir
1354 root_sbindir=$sbindir
1355 root_libdir=$libdir
1356 root_sysconfdir=$sysconfdir
1357else
1358 root_bindir='${root_prefix}/bin'
1359 root_sbindir='${root_prefix}/sbin'
1360 root_libdir='${root_prefix}/lib'
1361 root_sysconfdir='${root_prefix}/etc'
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001362fi
Theodore Ts'oc4ef11c2008-01-04 16:55:37 -05001363if test "$bindir" != '${exec_prefix}/bin'; then
1364 root_bindir=$bindir
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001365 AC_MSG_RESULT([Setting root_bindir to $root_bindir])
Theodore Ts'oc4ef11c2008-01-04 16:55:37 -05001366fi
1367if test "$sbindir" != '${exec_prefix}/sbin'; then
1368 root_sbindir=$sbindir
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001369 AC_MSG_RESULT([Setting root_sbindir to $root_sbindir])
Theodore Ts'oc4ef11c2008-01-04 16:55:37 -05001370fi
1371if test "$libdir" != '${exec_prefix}/lib'; then
1372 root_libdir=$libdir
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001373 AC_MSG_RESULT([Setting root_libdir to $root_libdir])
Theodore Ts'oc4ef11c2008-01-04 16:55:37 -05001374fi
1375if test "$sysconfdir" != '${prefix}/etc'; then
1376 root_sysconfdir=$sysconfdir
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001377 AC_MSG_RESULT([Setting root_sysconfdir to $root_sysconfdir])
Theodore Ts'oc4ef11c2008-01-04 16:55:37 -05001378fi
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +00001379AC_SUBST(root_prefix)
Theodore Ts'ob5ffead2002-05-11 19:17:00 -04001380AC_SUBST(root_bindir)
1381AC_SUBST(root_sbindir)
1382AC_SUBST(root_libdir)
1383AC_SUBST(root_sysconfdir)
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001384dnl
Theodore Ts'o55e00a22011-09-18 23:53:23 -04001385dnl Allow specification of the multiarch arch
1386dnl
1387AC_ARG_WITH([multiarch],
1388[ --with-multiarch=ARCH specify the multiarch triplet],
Theodore Ts'od7fa4102014-02-05 15:45:36 -05001389if test "$withval" = "lib64"; then
1390 libdir=/usr/lib64
1391 root_libdir=/lib64
1392else
1393 libdir=$libdir/$withval
1394 root_libdir=$root_libdir/$withval
1395fi
Theodore Ts'o55e00a22011-09-18 23:53:23 -04001396)dnl
1397dnl
Theodore Ts'od3de1a72012-12-15 22:10:27 -05001398dnl See if -static works. This could fail if the linker does not
1399dnl support -static, or if required external libraries are not available
1400dnl in static form.
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001401dnl
Theodore Ts'od3de1a72012-12-15 22:10:27 -05001402AC_MSG_CHECKING([whether we can link with -static])
Theodore Ts'oae851481997-04-29 18:13:24 +00001403AC_CACHE_VAL(ac_cv_e2fsprogs_use_static,
Theodore Ts'ofd1677e2016-05-21 23:51:19 -04001404[SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS_STATIC -static"
Theodore Ts'oae851481997-04-29 18:13:24 +00001405AC_TRY_LINK([#include <stdio.h>],[fflush(stdout);],
1406 ac_cv_e2fsprogs_use_static=yes, ac_cv_e2fsprogs_use_static=no)
1407LDFLAGS=$SAVE_LDFLAGS])
Theodore Ts'odefde781999-01-04 07:39:19 +00001408dnl
1409dnl Regardless of how the test turns out, Solaris doesn't handle -static
1410dnl This is caused by the socket library requiring the nsl library, which
1411dnl requires the -dl library, which only works for dynamically linked
1412dnl programs. It basically means you can't have statically linked programs
1413dnl which use the network under Solaris.
1414dnl
1415case "$host_os" in
1416solaris2.*)
1417 ac_cv_e2fsprogs_use_static=no
1418;;
1419esac
Theodore Ts'oae851481997-04-29 18:13:24 +00001420AC_MSG_RESULT($ac_cv_e2fsprogs_use_static)
Theodore Ts'oae851481997-04-29 18:13:24 +00001421if test $ac_cv_e2fsprogs_use_static = yes; then
Theodore Ts'ofd1677e2016-05-21 23:51:19 -04001422 LDFLAGS_STATIC="$LDFLAGS_STATIC -static"
Theodore Ts'oae851481997-04-29 18:13:24 +00001423fi
Theodore Ts'ofd1677e2016-05-21 23:51:19 -04001424AC_SUBST(LDFLAGS_STATIC)
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001425dnl
Theodore Ts'o07a0db12003-07-05 14:50:24 -04001426dnl Work around mysterious Darwin / GNU libintl problem
1427dnl (__asm__ redirection doesn't work for some mysterious reason. Looks like
1428dnl Apple hacked gcc somehow?)
1429dnl
1430case "$host_os" in
1431darwin*)
Theodore Ts'o02d04db2008-08-22 10:52:42 -04001432 AC_MSG_RESULT([Using Apple Darwin / GNU libintl workaround])
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001433 AC_DEFINE(_INTL_REDIRECT_MACROS, 1,
1434 [Define to 1 if Apple Darwin libintl workaround is needed])
Theodore Ts'o07a0db12003-07-05 14:50:24 -04001435 ;;
1436esac
1437dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001438dnl Only try to run the test suite if we're not cross compiling.
1439dnl
1440if test "$cross_compiling" = yes ; then
1441 DO_TEST_SUITE=
1442else
1443 DO_TEST_SUITE=check
1444fi
1445AC_SUBST(DO_TEST_SUITE)
1446dnl
Theodore Ts'oc6f35b82003-05-17 16:29:27 -04001447dnl Only include the intl include files if we're building with them
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001448dnl
1449INCLUDES='-I. -I$(top_builddir)/lib -I$(top_srcdir)/lib'
1450if test -n "$CPPFLAGS" ; then
1451 INCLUDES="$INCLUDES $CPPFLAGS"
Theodore Ts'oc6f35b82003-05-17 16:29:27 -04001452fi
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001453if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
1454 INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
1455fi
Theodore Ts'o6c59a662014-01-04 20:44:29 -05001456if test -n "$WITH_DIET_LIBC" ; then
1457 INCLUDES="$INCLUDES -D_REENTRANT"
1458fi
Theodore Ts'od1154eb2011-09-18 17:34:37 -04001459AC_SUBST(INCLUDES)
Theodore Ts'o5b5bd2c2014-07-10 00:17:05 -04001460AM_MKINSTALLDIRS
Theodore Ts'oc6f35b82003-05-17 16:29:27 -04001461dnl
Theodore Ts'odd947da2005-11-09 18:37:07 -04001462dnl Build CFLAGS
1463dnl
1464if test $cross_compiling = no; then
Theodore Ts'o28739272014-01-03 00:26:43 -05001465 BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
Theodore Ts'odd947da2005-11-09 18:37:07 -04001466 BUILD_LDFLAGS="$LDFLAGS"
Theodore Ts'odd947da2005-11-09 18:37:07 -04001467fi
1468AC_SUBST(BUILD_CFLAGS)
1469AC_SUBST(BUILD_LDFLAGS)
1470dnl
Theodore Ts'ofd1677e2016-05-21 23:51:19 -04001471dnl Define CFLAGS and LDFLAGS for shared libraries
1472dnl
1473CFLAGS_SHLIB=${CFLAGS_SHLIB:-$CFLAGS}
1474CFLAGS_STLIB=${CFLAGS_STLIB:-$CFLAGS}
1475LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS}
1476AC_SUBST(CFLAGS_SHLIB)
1477AC_SUBST(CFLAGS_STLIB)
1478AC_SUBST(LDFLAGS_SHLIB)
Darrick J. Wong5ce368f2018-03-23 18:57:09 -07001479
1480dnl
1481dnl Where do udev rules go?
1482dnl
1483AC_ARG_WITH([udev_rules_dir],
1484 [AS_HELP_STRING([--with-udev-rules-dir@<:@=DIR@:>@],
1485 [Install udev rules into DIR.])],
1486 [],
1487 [with_udev_rules_dir=yes])
1488AS_IF([test "x${with_udev_rules_dir}" != "xno"],
1489 [
1490 AS_IF([test "x${with_udev_rules_dir}" = "xyes"],
1491 [
1492 PKG_CHECK_MODULES([udev], [udev],
1493 [
1494 with_udev_rules_dir="$($PKG_CONFIG --variable=udevdir udev)/rules.d"
1495 ], [
1496 with_udev_rules_dir=""
1497 ])
1498 ])
1499 AC_MSG_CHECKING([for udev rules dir])
1500 pkg_udev_rules_dir="${with_udev_rules_dir}"
1501 AS_IF([test -n "${pkg_udev_rules_dir}"],
1502 [
1503 AC_MSG_RESULT(${pkg_udev_rules_dir})
1504 have_udev="yes"
1505 ],
1506 [
1507 AC_MSG_RESULT(no)
1508 have_udev="no"
1509 ])
1510 ],
1511 [
1512 have_udev="disabled"
1513 ])
1514AC_SUBST(have_udev)
1515AC_SUBST(pkg_udev_rules_dir)
1516
Theodore Ts'ofd1677e2016-05-21 23:51:19 -04001517dnl
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001518dnl Make our output files, being sure that we create the some miscellaneous
1519dnl directories
1520dnl
1521test -d lib || mkdir lib
1522test -d include || mkdir include
1523test -d include/linux || mkdir include/linux
Theodore Ts'odefde781999-01-04 07:39:19 +00001524test -d include/asm || mkdir include/asm
Theodore Ts'o44dfb372015-07-01 19:42:05 -04001525if test -z "$UUID_CMT" ; then
1526 uuid_out_list="lib/uuid/Makefile lib/uuid/uuid.pc \
1527 lib/uuid/uuid_types.h"
1528fi
1529if test -z "$BLKID_CMT" ; then
1530 blkid_out_list="lib/blkid/Makefile lib/blkid/blkid.pc \
1531 lib/blkid/blkid_types.h"
1532fi
Theodore Ts'obff0cc92003-03-23 01:37:53 -05001533for i in MCONFIG Makefile e2fsprogs.spec \
Theodore Ts'o183c73b2012-05-12 23:13:24 -04001534 util/Makefile util/subst.conf util/gen-tarball util/install-symlink \
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -04001535 lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
1536 lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \
Theodore Ts'of34af412015-07-11 23:05:57 -04001537 $uuid_out_list $blkid_out_list lib/support/Makefile \
Theodore Ts'o44dfb372015-07-01 19:42:05 -04001538 lib/ss/ss.pc lib/et/com_err.pc lib/e2p/e2p.pc lib/ext2fs/ext2fs.pc \
Theodore Ts'o921f4ad2004-11-19 17:25:27 -05001539 misc/Makefile ext2ed/Makefile e2fsck/Makefile \
Theodore Ts'o94ba8c72003-03-02 02:07:14 -05001540 debugfs/Makefile tests/Makefile tests/progs/Makefile \
Matthias Andree98a5ad62009-07-15 17:37:52 +02001541 resize/Makefile doc/Makefile intl/Makefile \
Darrick J. Wong5ce368f2018-03-23 18:57:09 -07001542 intl/libgnuintl.h po/Makefile.in scrub/Makefile; do
Theodore Ts'o94ba8c72003-03-02 02:07:14 -05001543 if test -d `dirname ${srcdir}/$i` ; then
1544 outlist="$outlist $i"
1545 fi
1546done
1547AC_OUTPUT($outlist)
Theodore Ts'oee683a12005-02-05 15:53:56 -05001548if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi