12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- # Disarchive
- # Copyright © 2019 Timothy Sample <samplet@ngyro.com>
- #
- # This file is part of Disarchive.
- #
- # Disarchive is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # Disarchive is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with Disarchive. If not, see <https://www.gnu.org/licenses/>.
- AC_INIT([Disarchive],
- m4_esyscmd([build-aux/git-version-gen .tarball-version]),
- [samplet@ngyro.com],
- [disarchive])
- AC_CONFIG_SRCDIR([disarchive/git-hash.scm])
- AC_CONFIG_AUX_DIR([build-aux])
- AM_INIT_AUTOMAKE([color-tests silent-rules subdir-objects
- -Wall -Werror foreign])
- AM_SILENT_RULES([yes])
- AC_PROG_CC
- PKG_CHECK_MODULES([ZLIB], [zlib])
- GUILE_PKG([3.0])
- GUILE_PROGS
- AC_ARG_VAR([GUILD], [guild (Guile compiler) command])
- AS_IF([test "x$GUILD" = "x"],
- [PKG_CHECK_VAR([GUILD], [guile-$GUILE_EFFECTIVE_VERSION], [guild], [],
- [AC_MSG_ERROR(m4_normalize([
- 'guild' binary not found; please check your Guile installation.]))])])
- dnl This argument is passed to guild; it ensures cross-compiling uses
- dnl the right target.
- if test -n "$host_alias"; then
- AC_SUBST([GUILD_TARGET_OPTION], [--target=$host_alias])
- fi
- GUILE_MODULE_REQUIRED(gcrypt hash)
- GUILE_MODULE_REQUIRED(lzma)
- GUILE_MODULE_REQUIRED(bzip2)
- dnl Older versions of Guile are missing O_NOFOLLOW. We compute it here
- dnl so that we can make a shim if we need to.
- AC_ARG_VAR([O_NOFOLLOW], [value to use for O_NOFOLLOW (cf. <fcntl.h>)])
- AS_IF([test "x$O_NOFOLLOW" = "x"],
- [AC_MSG_CHECKING([the value of O_NOFOLLOW])]
- [AC_COMPUTE_INT([O_NOFOLLOW],
- [O_NOFOLLOW],
- [[
- #include <fcntl.h>
- #include <stdio.h>
- ]],
- [AC_MSG_FAILURE([could find value for O_NOFOLLOW])])]
- [AC_MSG_RESULT([$O_NOFOLLOW])])
- AC_ARG_VAR([TAR], [tar utility])
- AS_IF([test "x$TAR" = "x"], [AC_PATH_PROG([TAR], [tar])])
- AS_IF([test "x$TAR" = "x"], [AC_MSG_ERROR(['tar' binary not found])])
- AC_ARG_VAR([GZIP], [gzip utility])
- AS_IF([test "x$GZIP" = "x"], [AC_PATH_PROG([GZIP], [gzip])])
- AS_IF([test "x$GZIP" = "x"], [AC_MSG_ERROR(['gzip' binary not found])])
- AC_ARG_VAR([XZ], [xz utility])
- AS_IF([test "x$XZ" = "x"], [AC_PATH_PROG([XZ], [xz])])
- AS_IF([test "x$XZ" = "x"], [AC_MSG_ERROR(['xz' binary not found])])
- AC_ARG_VAR([BZIP2], [bzip2 utility])
- AS_IF([test "x$BZIP2" = "x"], [AC_PATH_PROG([BZIP2], [bzip2])])
- AS_IF([test "x$BZIP2" = "x"], [AC_MSG_ERROR(['bzip2' binary not found])])
- AC_CONFIG_FILES([Makefile])
- AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
- [chmod +x pre-inst-env])
- AC_CONFIG_FILES([build-aux/tests-env])
- AC_OUTPUT
|