1 # configure.ac for dosfstools
2 # Copyright (C) 2015 Andreas Bombe <aeb@debian.org>
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AC_INIT([dosfstools], [4.2])
18 AC_SUBST([RELEASE_DATE], [2021-01-31])
19 AM_INIT_AUTOMAKE([1.11 foreign subdir-objects parallel-tests])
21 AC_ARG_ENABLE([compat-symlinks],
22 [AS_HELP_STRING([--enable-compat-symlinks],
23 [install symlinks for legacy names of the tools])],
24 [case "${enableval}" in
27 *) AC_MSG_ERROR([bad value ${enableval} for --enable-compat-symlinks]) ;;
30 AM_CONDITIONAL([COMPAT_SYMLINKS], [test x$symlinks = xtrue])
32 AC_ARG_ENABLE([atari-check],
33 [AS_HELP_STRING([--enable-atari-check],
34 [enable legacy check to let tools switch to Atari mode
35 when they detect they are running on 68k Atari
36 hardware (Linux only)])],
37 [case "${enableval}" in
38 yes) AC_SUBST(CHECKATARI, [1])
39 AC_DEFINE(CONF_CHECK_ATARI) ;;
40 no) AC_SUBST(CHECKATARI, [0]) ;;
41 *) AC_MSG_ERROR([bad value ${enableval} for --enable-atari-check]) ;;
43 [AC_SUBST(CHECKATARI, [0])])
45 AC_USE_SYSTEM_EXTENSIONS
65 AC_CHECK_HEADERS([endian.h sys/endian.h libkern/OSByteOrder.h])
67 AC_CHECK_FUNCS([vasprintf])
69 AC_CHECK_DECLS([getmntent], [], [], [[#include <mntent.h>]])
70 AC_CHECK_DECLS([getmntinfo], [], [], [[#include <sys/mount.h>]])
72 # optional iconv support
73 AC_ARG_WITH([iconv], AS_HELP_STRING([--without-iconv], [build without iconv support]))
74 if test "x$with_iconv" != "xno"; then
78 # xxd (distributed with vim) is used in the testsuite
79 AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
81 # check if automake is 1.11 or 1.12 for using a workaround for the parallel test harness
82 # (we check for a minimum version of 1.11 above, so these are the only two values to check)
83 AM_CONDITIONAL(AUTOMAKE_TEST_COMPAT, test $am__api_version = 1.11 -o $am__api_version = 1.12)
85 AC_CONFIG_FILES([Makefile src/Makefile src/version.h
86 manpages/Makefile manpages/mkfs.fat.8
87 manpages/fsck.fat.8 manpages/fatlabel.8