Blame configure.ac

Packit Service 2a3f3d
AC_PREREQ([2.63])
Packit Service 2a3f3d
dnl To do a release: follow the instructions to update libostree-released.sym from
Packit Service 2a3f3d
dnl libostree-devel.sym, update the checksum in test-symbols.sh, set is_release_build=yes
Packit Service 2a3f3d
dnl below. Then make another post-release commit to bump the version and set
Packit Service 2a3f3d
dnl is_release_build=no.
Packit Service 2a3f3d
dnl Seed the release notes with `git-shortlog-with-prs <previous-release>..`. Then use
Packit Service 2a3f3d
dnl `git-evtag` to create the tag and push it. Finally, create a GitHub release and attach
Packit Service 2a3f3d
dnl the tarball from `make dist`.
Packit Service 2a3f3d
m4_define([year_version], [2020])
Packit Service b97f6f
m4_define([release_version], [7])
Packit Service 2a3f3d
m4_define([package_version], [year_version.release_version])
Packit Service 2a3f3d
AC_INIT([libostree], [package_version], [walters@verbum.org])
Packit Service 2a3f3d
is_release_build=yes
Packit Service 2a3f3d
AC_CONFIG_HEADER([config.h])
Packit Service 2a3f3d
AC_CONFIG_MACRO_DIR([buildutil])
Packit Service 2a3f3d
AC_CONFIG_AUX_DIR([build-aux])
Packit Service 2a3f3d
Packit Service 2a3f3d
AM_INIT_AUTOMAKE([1.13 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz
Packit Service 2a3f3d
                  color-tests subdir-objects])
Packit Service 2a3f3d
AM_MAINTAINER_MODE([enable])
Packit Service 2a3f3d
AM_SILENT_RULES([yes])
Packit Service 2a3f3d
AC_USE_SYSTEM_EXTENSIONS
Packit Service 2a3f3d
AC_SYS_LARGEFILE
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_PROG_CC
Packit Service 2a3f3d
AM_PROG_CC_C_O
Packit Service 2a3f3d
AC_PROG_YACC
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl Versioning information
Packit Service 2a3f3d
AC_SUBST([YEAR_VERSION], [year_version])
Packit Service 2a3f3d
AC_SUBST([RELEASE_VERSION], [release_version])
Packit Service 2a3f3d
AC_SUBST([PACKAGE_VERSION], [package_version])
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([echo "$CFLAGS" | grep -q -E -e '-Werror($| )'], [], [
Packit Service 2a3f3d
CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\
Packit Service 2a3f3d
  -pipe \
Packit Service 2a3f3d
  -Wall \
Packit Service b97f6f
  -Werror=shadow \
Packit Service 2a3f3d
  -Werror=empty-body \
Packit Service 2a3f3d
  -Werror=strict-prototypes \
Packit Service 2a3f3d
  -Werror=missing-prototypes \
Packit Service 2a3f3d
  -Werror=implicit-function-declaration \
Packit Service 2a3f3d
  "-Werror=format=2 -Werror=format-security -Werror=format-nonliteral" \
Packit Service 2a3f3d
  -Werror=pointer-arith -Werror=init-self \
Packit Service 2a3f3d
  -Werror=missing-declarations \
Packit Service 2a3f3d
  -Werror=return-type \
Packit Service 2a3f3d
  -Werror=switch \
Packit Service 2a3f3d
  -Werror=overflow \
Packit Service 2a3f3d
  -Werror=int-conversion \
Packit Service 2a3f3d
  -Werror=parentheses \
Packit Service 2a3f3d
  -Werror=undef \
Packit Service 2a3f3d
  -Werror=incompatible-pointer-types \
Packit Service 2a3f3d
  -Werror=misleading-indentation \
Packit Service 2a3f3d
  -Werror=missing-include-dirs -Werror=aggregate-return \
Packit Service 2a3f3d
  -Wstrict-aliasing=2 \
Packit Service 2a3f3d
  -Werror=unused-result \
Packit Service 2a3f3d
])])
Packit Service 2a3f3d
AC_SUBST(WARN_CFLAGS)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_MSG_CHECKING([for -fsanitize=address in CFLAGS])
Packit Service 2a3f3d
if echo $CFLAGS | grep -q -e -fsanitize=address; then
Packit Service 2a3f3d
  AC_MSG_RESULT([yes])
Packit Service 2a3f3d
  using_asan=yes
Packit Service 2a3f3d
else
Packit Service 2a3f3d
  AC_MSG_RESULT([no])
Packit Service 2a3f3d
fi
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_ASAN, [test x$using_asan = xyes])
Packit Service 2a3f3d
AM_COND_IF([BUILDOPT_ASAN],
Packit Service 2a3f3d
  [AC_DEFINE([BUILDOPT_ASAN], 1, [Define if we are building with -fsanitize=address])])
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_MSG_CHECKING([for -fsanitize=thread in CFLAGS])
Packit Service 2a3f3d
if echo $CFLAGS | grep -q -e -fsanitize=thread; then
Packit Service 2a3f3d
  AC_MSG_RESULT([yes])
Packit Service 2a3f3d
  using_tsan=yes
Packit Service 2a3f3d
else
Packit Service 2a3f3d
  AC_MSG_RESULT([no])
Packit Service 2a3f3d
fi
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_TSAN, [test x$using_tsan = xyes])
Packit Service 2a3f3d
AM_COND_IF([BUILDOPT_TSAN],
Packit Service 2a3f3d
  [AC_DEFINE([BUILDOPT_TSAN], 1, [Define if we are building with -fsanitize=thread])])
Packit Service 2a3f3d
Packit Service 2a3f3d
# Initialize libtool
Packit Service 2a3f3d
LT_PREREQ([2.2.4])
Packit Service 2a3f3d
LT_INIT([disable-static])
Packit Service 2a3f3d
Packit Service 2a3f3d
OSTREE_FEATURES=""
Packit Service 2a3f3d
AC_SUBST([OSTREE_FEATURES])
Packit Service 2a3f3d
Packit Service 2a3f3d
GLIB_TESTS
Packit Service 2a3f3d
LIBGLNX_CONFIGURE
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl These bits attempt to mirror https://github.com/coreutils/gnulib/blob/e369b04cca4da1534c98628b8ee4648bfca2bb3a/m4/parse-datetime.m4#L27
Packit Service 2a3f3d
AC_CHECK_FUNCS([nanotime clock_gettime])
Packit Service 2a3f3d
AC_STRUCT_TIMEZONE
Packit Service 2a3f3d
AC_CHECK_HEADER([sys/xattr.h],,[AC_MSG_ERROR([You must have sys/xattr.h from glibc])])
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test "$YACC" != "bison -y"], [AC_MSG_ERROR([bison not found but required])])
Packit Service 2a3f3d
Packit Service 2a3f3d
PKG_PROG_PKG_CONFIG
Packit Service 2a3f3d
Packit Service 2a3f3d
# PKG_CHECK_VAR added to pkg-config 0.28
Packit Service 2a3f3d
m4_define_default(
Packit Service 2a3f3d
    [PKG_CHECK_VAR],
Packit Service 2a3f3d
    [AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])
Packit Service 2a3f3d
     AS_IF([test -z "$$1"], [$1=`$PKG_CONFIG --variable="$3" "$2"`])
Packit Service 2a3f3d
     AS_IF([test -n "$$1"], [$4], [$5])])
Packit Service 2a3f3d
Packit Service 2a3f3d
PKG_CHECK_VAR(BASH_COMPLETIONSDIR, [bash-completion], [completionsdir], ,
Packit Service 2a3f3d
  BASH_COMPLETIONSDIR="${datadir}/bash-completion/completions")
Packit Service 2a3f3d
AC_SUBST(BASH_COMPLETIONSDIR)
Packit Service 2a3f3d
Packit Service 2a3f3d
AM_PATH_GLIB_2_0(,,AC_MSG_ERROR([GLib not found]))
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl When bumping the gio-unix-2.0 dependency (or glib-2.0 in general),
Packit Service 2a3f3d
dnl remember to bump GLIB_VERSION_MIN_REQUIRED and
Packit Service 2a3f3d
dnl GLIB_VERSION_MAX_ALLOWED in Makefile.am
Packit Service 2a3f3d
GIO_DEPENDENCY="gio-unix-2.0 >= 2.40.0"
Packit Service 2a3f3d
PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl 5.1.0 is an arbitrary version here
Packit Service 2a3f3d
PKG_CHECK_MODULES(OT_DEP_LZMA, liblzma >= 5.0.5)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl Needed for rollsum
Packit Service 2a3f3d
PKG_CHECK_MODULES(OT_DEP_ZLIB, zlib)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl We're not actually linking to this, just using the header
Packit Service 2a3f3d
PKG_CHECK_MODULES(OT_DEP_E2P, e2p)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl Arbitrary version that's in CentOS7.2 now
Packit Service 2a3f3d
CURL_DEPENDENCY=7.29.0
Packit Service 2a3f3d
AC_ARG_WITH(curl,
Packit Service 2a3f3d
	    AS_HELP_STRING([--with-curl], [Use libcurl @<:@default=no@:>@]),
Packit Service 2a3f3d
	    [], [with_curl=no])
Packit Service 2a3f3d
AS_IF([test x$with_curl != xno ], [
Packit Service 2a3f3d
    PKG_CHECK_MODULES(OT_DEP_CURL, libcurl >= $CURL_DEPENDENCY)
Packit Service 2a3f3d
    with_curl=yes
Packit Service 2a3f3d
    AC_DEFINE([HAVE_LIBCURL], 1, [Define if we have libcurl.pc])
Packit Service 2a3f3d
    dnl Currently using libcurl requires soup for trivial-httpd for tests
Packit Service 2a3f3d
    with_soup_default=yes
Packit Service 2a3f3d
], [with_soup_default=check])
Packit Service 2a3f3d
AM_CONDITIONAL(USE_CURL, test x$with_curl != xno)
Packit Service 2a3f3d
if test x$with_curl = xyes; then OSTREE_FEATURES="$OSTREE_FEATURES libcurl"; fi
Packit Service 2a3f3d
AC_ARG_ENABLE(http2,
Packit Service 2a3f3d
AS_HELP_STRING([--disable-http2],
Packit Service 2a3f3d
  [Disable use of http2 (default: no)]),,
Packit Service 2a3f3d
  [enable_http2=yes])
Packit Service 2a3f3d
AS_IF([test x$enable_http2 != xno ], [
Packit Service 2a3f3d
  AC_DEFINE([BUILDOPT_HTTP2], 1, [Define if we enable http2 by default])
Packit Service 2a3f3d
], [
Packit Service 2a3f3d
  OSTREE_FEATURES="$OSTREE_FEATURES no-http2"
Packit Service 2a3f3d
])
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl When bumping the libsoup-2.4 dependency, remember to bump
Packit Service 2a3f3d
dnl SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED in
Packit Service 2a3f3d
dnl Makefile.am
Packit Service 2a3f3d
SOUP_DEPENDENCY="libsoup-2.4 >= 2.39.1"
Packit Service 2a3f3d
AC_ARG_WITH(soup,
Packit Service 2a3f3d
	    AS_HELP_STRING([--with-soup], [Use libsoup @<:@default=yes@:>@]),
Packit Service 2a3f3d
	    [], [with_soup=$with_soup_default])
Packit Service 2a3f3d
AS_IF([test x$with_soup != xno], [
Packit Service 2a3f3d
  AC_ARG_ENABLE(libsoup_client_certs,
Packit Service 2a3f3d
                AS_HELP_STRING([--enable-libsoup-client-certs],
Packit Service 2a3f3d
                               [Require availability of new enough libsoup TLS client cert API (default: auto)]),,
Packit Service 2a3f3d
                [enable_libsoup_client_certs=auto])
Packit Service 2a3f3d
  AC_MSG_CHECKING([for $SOUP_DEPENDENCY])
Packit Service 2a3f3d
  PKG_CHECK_EXISTS($SOUP_DEPENDENCY, have_soup=yes, have_soup=no)
Packit Service 2a3f3d
  AC_MSG_RESULT([$have_soup])
Packit Service 2a3f3d
    AS_IF([ test x$have_soup = xno && test x$with_soup != xcheck], [
Packit Service 2a3f3d
       AC_MSG_ERROR([libsoup is enabled but could not be found])
Packit Service 2a3f3d
  ])
Packit Service 2a3f3d
  AS_IF([test x$have_soup = xyes], [
Packit Service 2a3f3d
    PKG_CHECK_MODULES(OT_DEP_SOUP, $SOUP_DEPENDENCY)
Packit Service 2a3f3d
    AC_DEFINE([HAVE_LIBSOUP], 1, [Define if we have libsoup.pc])
Packit Service 2a3f3d
    with_soup=yes
Packit Service 2a3f3d
    save_CFLAGS=$CFLAGS
Packit Service 2a3f3d
    CFLAGS=$OT_DEP_SOUP_CFLAGS
Packit Service 2a3f3d
    have_libsoup_client_certs=no
Packit Service 2a3f3d
    AC_CHECK_DECL([SOUP_SESSION_TLS_INTERACTION], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_LIBSOUP_CLIENT_CERTS], 1, [Define if we have libsoup client certs])
Packit Service 2a3f3d
        have_libsoup_client_certs=yes
Packit Service 2a3f3d
        ], [], [#include <libsoup/soup.h>])
Packit Service 2a3f3d
    AS_IF([test x$enable_libsoup_client_certs = xyes && test x$have_libsoup_client_certs != xyes], [
Packit Service 2a3f3d
      AC_MSG_ERROR([libsoup client certs explicitly requested but not found])
Packit Service 2a3f3d
    ]) 
Packit Service 2a3f3d
    CFLAGS=$save_CFLAGS
Packit Service 2a3f3d
  ], [
Packit Service 2a3f3d
    with_soup=no
Packit Service 2a3f3d
  ])
Packit Service 2a3f3d
], [ with_soup=no ])
Packit Service 2a3f3d
if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno)
Packit Service 2a3f3d
AM_CONDITIONAL(HAVE_LIBSOUP_CLIENT_CERTS, test x$have_libsoup_client_certs = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_ENABLE(trivial-httpd-cmdline,
Packit Service 2a3f3d
  [AS_HELP_STRING([--enable-trivial-httpd-cmdline],
Packit Service 2a3f3d
  [Continue to support "ostree trivial-httpd" [default=no]])],,
Packit Service 2a3f3d
  enable_trivial_httpd_cmdline=no)
Packit Service 2a3f3d
AS_IF([test x$enable_trivial_httpd_cmdline = xyes],
Packit Service 2a3f3d
  [AC_DEFINE([BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE], 1, [Define if we are enabling ostree trivial-httpd entrypoint])]
Packit Service 2a3f3d
)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test x$with_curl = xyes && test x$with_soup = xno], [
Packit Service 2a3f3d
  AC_MSG_WARN([Curl enabled, but libsoup is not; libsoup is needed for tests (make check, etc.)])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(USE_CURL_OR_SOUP, test x$with_curl != xno || test x$with_soup != xno)
Packit Service 2a3f3d
AS_IF([test x$with_curl != xno || test x$with_soup != xno],
Packit Service 2a3f3d
            [AC_DEFINE([HAVE_LIBCURL_OR_LIBSOUP], 1, [Define if we have soup or curl])])
Packit Service 2a3f3d
AS_IF([test x$with_curl = xyes], [fetcher_backend=curl], [test x$with_soup = xyes], [fetcher_backend=libsoup], [fetcher_backend=none])
Packit Service 2a3f3d
Packit Service 2a3f3d
m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
Packit Service 2a3f3d
  GOBJECT_INTROSPECTION_CHECK([1.34.0])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_INTROSPECTION, test "x$found_introspection" = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
LIBGPGME_DEPENDENCY="1.1.8"
Packit Service 2a3f3d
AC_ARG_WITH(gpgme,
Packit Service 2a3f3d
	    AS_HELP_STRING([--with-gpgme], [Use gpgme @<:@default=yes@:>@]),
Packit Service 2a3f3d
	    [], [with_gpgme=yes])
Packit Service 2a3f3d
AS_IF([test x$with_gpgme != xno], [
Packit Service 2a3f3d
    PKG_CHECK_MODULES(OT_DEP_GPGME, gpgme-pthread >= $LIBGPGME_DEPENDENCY, have_gpgme=yes, [
Packit Service 2a3f3d
        m4_ifdef([AM_PATH_GPGME_PTHREAD], [
Packit Service 2a3f3d
            AM_PATH_GPGME_PTHREAD($LIBGPGME_DEPENDENCY, have_gpgme=yes, have_gpgme=no)
Packit Service 2a3f3d
        ],[ have_gpgme=no ])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_gpgme = xno ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    OSTREE_FEATURES="$OSTREE_FEATURES gpgme"
Packit Service 2a3f3d
    PKG_CHECK_MODULES(OT_DEP_GPG_ERROR, [gpg-error], [], [
Packit Service 2a3f3d
dnl This apparently doesn't ship a pkg-config file either, and we need
Packit Service 2a3f3d
dnl to link to it directly.
Packit Service 2a3f3d
        AC_PATH_PROG(GPG_ERROR_CONFIG, [gpg-error-config], [AC_MSG_ERROR([Missing gpg-error-config])])
Packit Service 2a3f3d
        OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )"
Packit Service 2a3f3d
        OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )"
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}"
Packit Service 2a3f3d
    OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}"
Packit Service 2a3f3d
    ],
Packit Service 2a3f3d
    [
Packit Service 2a3f3d
    AC_DEFINE([OSTREE_DISABLE_GPGME], 1, [Define to disable internal GPGME support])
Packit Service 2a3f3d
    with_gpgme=no
Packit Service 2a3f3d
    ]
Packit Service 2a3f3d
)
Packit Service 2a3f3d
AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
Packit Service 2a3f3d
LIBSODIUM_DEPENDENCY="1.0.14"
Packit Service 2a3f3d
AC_ARG_WITH(ed25519_libsodium,
Packit Service 2a3f3d
	    AS_HELP_STRING([--with-ed25519-libsodium], [Use libsodium for ed25519 @<:@default=no@:>@]),
Packit Service 2a3f3d
	    [], [with_ed25519_libsodium=no])
Packit Service 2a3f3d
AS_IF([test x$with_ed25519_libsodium != xno], [
Packit Service 2a3f3d
    AC_DEFINE([HAVE_LIBSODIUM], 1, [Define if using libsodium])
Packit Service 2a3f3d
    PKG_CHECK_MODULES(OT_DEP_LIBSODIUM, libsodium >= $LIBSODIUM_DEPENDENCY, have_libsodium=yes,  have_libsodium=no)
Packit Service 2a3f3d
    AS_IF([ test x$have_libsodium = xno ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([Need LIBSODIUM version $LIBSODIUM_DEPENDENCY or later])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    OSTREE_FEATURES="$OSTREE_FEATURES sign-ed25519"
Packit Service 2a3f3d
], with_ed25519_libsodium=no )
Packit Service 2a3f3d
AM_CONDITIONAL(USE_LIBSODIUM, test "x$have_libsodium" = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
Packit Service 2a3f3d
# What's in RHEL7.2.
Packit Service 2a3f3d
FUSE_DEPENDENCY="fuse >= 2.9.2"
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_CHECK_HEADERS([linux/fsverity.h])
Packit Service 2a3f3d
AS_IF([test x$ac_cv_header_linux_fsverity_h = xyes ],
Packit Service 2a3f3d
  [OSTREE_FEATURES="$OSTREE_FEATURES ex-fsverity"])
Packit Service 2a3f3d
Packit Service 2a3f3d
# check for gtk-doc
Packit Service 2a3f3d
m4_ifdef([GTK_DOC_CHECK], [
Packit Service 2a3f3d
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
Packit Service 2a3f3d
],[
Packit Service 2a3f3d
enable_gtk_doc=no
Packit Service 2a3f3d
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
Packit Service 2a3f3d
])
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_ENABLE(man,
Packit Service 2a3f3d
              [AS_HELP_STRING([--enable-man],
Packit Service 2a3f3d
                              [generate man pages [default=auto]])],,
Packit Service 2a3f3d
              enable_man=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test "$enable_man" != no], [
Packit Service 2a3f3d
  AC_PATH_PROG([XSLTPROC], [xsltproc])
Packit Service 2a3f3d
  AS_IF([test -z "$XSLTPROC"], [
Packit Service 2a3f3d
    AS_IF([test "$enable_man" = yes], [
Packit Service 2a3f3d
      AC_MSG_ERROR([xsltproc is required for --enable-man])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    enable_man=no
Packit Service 2a3f3d
  ],[
Packit Service 2a3f3d
    enable_man=yes
Packit Service 2a3f3d
  ])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_ENABLE(rust,
Packit Service 2a3f3d
  [AS_HELP_STRING([--enable-rust],
Packit Service 2a3f3d
  [Compile Rust code instead of C [default=no]])],,
Packit Service 2a3f3d
   [enable_rust=no; rust_debug_release=no])
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test "$enable_rust" = yes], [
Packit Service 2a3f3d
   AC_PATH_PROG([cargo], [cargo])
Packit Service 2a3f3d
   AS_IF([test -z "$cargo"], [AC_MSG_ERROR([cargo is required for --enable-rust])])
Packit Service 2a3f3d
   AC_PATH_PROG([rustc], [rustc])
Packit Service 2a3f3d
   AS_IF([test -z "$rustc"], [AC_MSG_ERROR([rustc is required for --enable-rust])])
Packit Service 2a3f3d
Packit Service 2a3f3d
   dnl These bits based on gnome:librsvg/configure.ac
Packit Service 2a3f3d
Packit Service 2a3f3d
   dnl By default, we build in public release mode.
Packit Service 2a3f3d
   AC_ARG_ENABLE(rust-debug,
Packit Service 2a3f3d
      AC_HELP_STRING([--enable-rust-debug],
Packit Service 2a3f3d
       [Build Rust code with debugging information [default=no]]),
Packit Service 2a3f3d
       [rust_debug_release=$enableval],
Packit Service 2a3f3d
       [rust_debug_release=release])
Packit Service 2a3f3d
Packit Service 2a3f3d
   AC_MSG_CHECKING(whether to build Rust code with debugging information)
Packit Service 2a3f3d
   if test "x$rust_debug_release" = "xyes" ; then
Packit Service 2a3f3d
      rust_debug_release=debug
Packit Service 2a3f3d
      AC_MSG_RESULT(yes)
Packit Service 2a3f3d
   else
Packit Service 2a3f3d
      AC_MSG_RESULT(no)
Packit Service 2a3f3d
   fi
Packit Service 2a3f3d
   RUST_TARGET_SUBDIR=${rust_debug_release}
Packit Service 2a3f3d
   AC_SUBST([RUST_TARGET_SUBDIR])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(RUST_DEBUG, [test "x$rust_debug_release" = "xdebug"])
Packit Service 2a3f3d
AM_CONDITIONAL(ENABLE_RUST, [test "$enable_rust" != no])
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(libarchive,
Packit Service 2a3f3d
	    AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
Packit Service 2a3f3d
	    :, with_libarchive=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([ test x$with_libarchive != xno ], [
Packit Service 2a3f3d
    AC_MSG_CHECKING([for $LIBARCHIVE_DEPENDENCY])
Packit Service 2a3f3d
    PKG_CHECK_EXISTS($LIBARCHIVE_DEPENDENCY, have_libarchive=yes, have_libarchive=no)
Packit Service 2a3f3d
    AC_MSG_RESULT([$have_libarchive])
Packit Service 2a3f3d
    AS_IF([ test x$have_libarchive = xno && test x$with_libarchive != xmaybe ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([libarchive is enabled but could not be found])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_libarchive = xyes], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_LIBARCHIVE], 1, [Define if we have libarchive.pc])
Packit Service 2a3f3d
	PKG_CHECK_MODULES(OT_DEP_LIBARCHIVE, $LIBARCHIVE_DEPENDENCY)
Packit Service 2a3f3d
        save_LIBS=$LIBS
Packit Service 2a3f3d
        LIBS=$OT_DEP_LIBARCHIVE_LIBS
Packit Service 2a3f3d
        AC_CHECK_FUNCS(archive_read_support_filter_all)
Packit Service 2a3f3d
        LIBS=$save_LIBS
Packit Service 2a3f3d
	with_libarchive=yes
Packit Service 2a3f3d
    ], [
Packit Service 2a3f3d
	with_libarchive=no
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
], [ with_libarchive=no ])
Packit Service 2a3f3d
if test x$with_libarchive != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libarchive"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl This is what is in RHEL7 anyways
Packit Service 2a3f3d
SELINUX_DEPENDENCY="libselinux >= 2.1.13"
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(selinux,
Packit Service 2a3f3d
	    AS_HELP_STRING([--without-selinux], [Do not use SELinux]),
Packit Service 2a3f3d
	    :, with_selinux=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([ test x$with_selinux != xno ], [
Packit Service 2a3f3d
    AC_MSG_CHECKING([for $SELINUX_DEPENDENCY])
Packit Service 2a3f3d
    PKG_CHECK_EXISTS($SELINUX_DEPENDENCY, have_selinux=yes, have_selinux=no)
Packit Service 2a3f3d
    AC_MSG_RESULT([$have_selinux])
Packit Service 2a3f3d
    AS_IF([ test x$have_selinux = xno && test x$with_selinux != xmaybe ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([SELinux is enabled but could not be found])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_selinux = xyes], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_SELINUX], 1, [Define if we have libselinux.pc])
Packit Service 2a3f3d
	PKG_CHECK_MODULES(OT_DEP_SELINUX, $SELINUX_DEPENDENCY)
Packit Service 2a3f3d
	with_selinux=yes
Packit Service 2a3f3d
    ], [
Packit Service 2a3f3d
	with_selinux=no
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
], [ with_selinux=no ])
Packit Service 2a3f3d
if test x$with_selinux != xno; then OSTREE_FEATURES="$OSTREE_FEATURES selinux"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_SELINUX, test $with_selinux != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(smack,
Packit Service 2a3f3d
AS_HELP_STRING([--with-smack], [Enable smack]),
Packit Service 2a3f3d
:, with_smack=no)
Packit Service 2a3f3d
AS_IF([ test x$with_smack = xyes], [
Packit Service 2a3f3d
  AC_DEFINE([WITH_SMACK], 1, [Define if we have smack.pc])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(USE_SMACK, test $with_smack != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl crypto
Packit Service 2a3f3d
AC_ARG_WITH(crypto,
Packit Service 2a3f3d
AS_HELP_STRING([--with-crypto], [Choose library for checksums, one of glib, openssl, gnutls (default: glib)]),
Packit Service 2a3f3d
:, with_crypto=glib)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test $with_crypto = glib],
Packit Service 2a3f3d
      [],
Packit Service 2a3f3d
      [test $with_crypto = openssl],
Packit Service 2a3f3d
      [with_openssl=yes],
Packit Service 2a3f3d
      [test $with_crypto = gnutls],
Packit Service 2a3f3d
      [],
Packit Service 2a3f3d
      [AC_MSG_ERROR([Invalid --with-crypto $with_crypto])]
Packit Service 2a3f3d
      )
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl begin openssl (really just libcrypto right now)
Packit Service 2a3f3d
dnl Note this option is now deprecated in favor of --with-crypto=openssl
Packit Service 2a3f3d
OPENSSL_DEPENDENCY="libcrypto >= 1.0.1"
Packit Service 2a3f3d
AC_ARG_WITH(openssl,
Packit Service 2a3f3d
AS_HELP_STRING([--with-openssl], [Enable use of OpenSSL libcrypto (checksums)]),with_openssl=$withval,with_openssl=no)
Packit Service 2a3f3d
AS_IF([ test x$with_openssl != xno ], [
Packit Service 2a3f3d
      PKG_CHECK_MODULES(OT_DEP_CRYPTO, $OPENSSL_DEPENDENCY)
Packit Service 2a3f3d
      AC_DEFINE([HAVE_OPENSSL], 1, [Define if we have openssl])
Packit Service 2a3f3d
      with_crypto=openssl
Packit Service 2a3f3d
      with_openssl=yes
Packit Service 2a3f3d
], [
Packit Service 2a3f3d
      with_openssl=no
Packit Service 2a3f3d
])
Packit Service 2a3f3d
if test x$with_openssl != xno; then OSTREE_FEATURES="$OSTREE_FEATURES openssl"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_OPENSSL, test $with_openssl != no)
Packit Service 2a3f3d
dnl end openssl
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl begin gnutls; in contrast to openssl this one only
Packit Service 2a3f3d
dnl supports --with-crypto=gnutls
Packit Service 2a3f3d
GNUTLS_DEPENDENCY="gnutls >= 3.5.0"
Packit Service 2a3f3d
AS_IF([ test $with_crypto = gnutls ], [
Packit Service 2a3f3d
      PKG_CHECK_MODULES(OT_DEP_CRYPTO, $GNUTLS_DEPENDENCY)
Packit Service 2a3f3d
      AC_DEFINE([HAVE_GNUTLS], 1, [Define if we have gnutls])
Packit Service 2a3f3d
      OSTREE_FEATURES="$OSTREE_FEATURES gnutls"
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(USE_GNUTLS, test $with_crypto = gnutls)
Packit Service 2a3f3d
dnl end gnutls
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl Avahi dependency for finding repos
Packit Service 2a3f3d
AVAHI_DEPENDENCY="avahi-client >= 0.6.31 avahi-glib >= 0.6.31"
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(avahi,
Packit Service 2a3f3d
            AS_HELP_STRING([--without-avahi], [Do not use Avahi]),
Packit Service 2a3f3d
            :, with_avahi=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([ test x$with_avahi != xno ], [
Packit Service 2a3f3d
    AC_MSG_CHECKING([for $AVAHI_DEPENDENCY])
Packit Service 2a3f3d
    PKG_CHECK_EXISTS($AVAHI_DEPENDENCY, have_avahi=yes, have_avahi=no)
Packit Service 2a3f3d
    AC_MSG_RESULT([$have_avahi])
Packit Service 2a3f3d
    AS_IF([ test x$have_avahi = xno && test x$with_avahi != xmaybe ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([Avahi is enabled but could not be found])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_avahi = xyes], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_AVAHI], 1, [Define if we have avahi-client.pc and avahi-glib.pc])
Packit Service 2a3f3d
        PKG_CHECK_MODULES(OT_DEP_AVAHI, $AVAHI_DEPENDENCY)
Packit Service 2a3f3d
        with_avahi=yes
Packit Service 2a3f3d
    ], [
Packit Service 2a3f3d
        with_avahi=no
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
], [ with_avahi=no ])
Packit Service 2a3f3d
if test x$with_avahi != xno; then OSTREE_FEATURES="$OSTREE_FEATURES avahi"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_AVAHI, test $with_avahi != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl This is what is in RHEL7.2 right now, picking it arbitrarily
Packit Service 2a3f3d
LIBMOUNT_DEPENDENCY="mount >= 2.23.0"
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(libmount,
Packit Service 2a3f3d
	    AS_HELP_STRING([--without-libmount], [Do not use libmount]),
Packit Service 2a3f3d
	    :, with_libmount=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([ test x$with_libmount != xno ], [
Packit Service 2a3f3d
    AC_MSG_CHECKING([for $LIBMOUNT_DEPENDENCY])
Packit Service 2a3f3d
    PKG_CHECK_EXISTS($LIBMOUNT_DEPENDENCY, have_libmount=yes, have_libmount=no)
Packit Service 2a3f3d
    AC_MSG_RESULT([$have_libmount])
Packit Service 2a3f3d
    AS_IF([ test x$have_libmount = xno && test x$with_libmount != xmaybe ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([libmount is enabled but could not be found])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_libmount = xyes], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_LIBMOUNT], 1, [Define if we have libmount.pc])
Packit Service 2a3f3d
	PKG_CHECK_MODULES(OT_DEP_LIBMOUNT, $LIBMOUNT_DEPENDENCY)
Packit Service 2a3f3d
	with_libmount=yes
Packit Service 2a3f3d
  save_LIBS=$LIBS
Packit Service 2a3f3d
  LIBS=$OT_DEP_LIBMOUNT_LIBS
Packit Service 2a3f3d
  AC_CHECK_FUNCS(mnt_unref_cache)
Packit Service 2a3f3d
  LIBS=$save_LIBS
Packit Service 2a3f3d
    ], [
Packit Service 2a3f3d
	with_libmount=no
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
], [ with_libmount=no ])
Packit Service 2a3f3d
if test x$with_libmount != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libmount"; fi
Packit Service 2a3f3d
AM_CONDITIONAL(USE_LIBMOUNT, test $with_libmount != no)
Packit Service 2a3f3d
Packit Service 2a3f3d
# Enabled by default because I think people should use it.
Packit Service 2a3f3d
AC_ARG_ENABLE(rofiles-fuse,
Packit Service 2a3f3d
              [AS_HELP_STRING([--enable-rofiles-fuse],
Packit Service 2a3f3d
                              [generate rofiles-fuse helper [default=yes]])],,
Packit Service 2a3f3d
              enable_rofiles_fuse=yes)
Packit Service 2a3f3d
AS_IF([ test x$enable_rofiles_fuse != xno ], [
Packit Service 2a3f3d
    PKG_CHECK_MODULES(BUILDOPT_FUSE, $FUSE_DEPENDENCY)
Packit Service 2a3f3d
], [enable_rofiles_fuse=no])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_FUSE, test x$enable_rofiles_fuse = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(dracut,
Packit Service 2a3f3d
            AS_HELP_STRING([--with-dracut],
Packit Service 2a3f3d
                           [Install dracut module (default: no)]),,
Packit Service 2a3f3d
              [with_dracut=no])
Packit Service 2a3f3d
case x$with_dracut in
Packit Service 2a3f3d
    xno) ;;
Packit Service 2a3f3d
    xyes) ;;
Packit Service 2a3f3d
    xyesbutnoconf) ;;
Packit Service 2a3f3d
    *) AC_MSG_ERROR([Unknown --with-dracut value $with_dracut])
Packit Service 2a3f3d
esac    
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_DRACUT, test x$with_dracut = xyes || test x$with_dracut = xyesbutnoconf)
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_DRACUT_CONF, test x$with_dracut = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(mkinitcpio,
Packit Service 2a3f3d
            AS_HELP_STRING([--with-mkinitcpio],
Packit Service 2a3f3d
                           [Install mkinitcpio module (default: no)]),,
Packit Service 2a3f3d
              [with_mkinitcpio=no])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_MKINITCPIO, test x$with_mkinitcpio = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl We have separate checks for libsystemd and the unit dir for historical reasons
Packit Service 2a3f3d
AC_ARG_WITH(libsystemd,
Packit Service 2a3f3d
            AS_HELP_STRING([--without-libsystemd], [Do not use libsystemd]),
Packit Service 2a3f3d
            :, with_libsystemd=maybe)
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([ test x$with_libsystemd != xno ], [
Packit Service 2a3f3d
    AC_MSG_CHECKING([for libsystemd])
Packit Service 2a3f3d
    PKG_CHECK_EXISTS(libsystemd, have_libsystemd=yes, have_libsystemd=no)
Packit Service 2a3f3d
    AC_MSG_RESULT([$have_libsystemd])
Packit Service 2a3f3d
    AS_IF([ test x$have_libsystemd = xno && test x$with_libsystemd != xmaybe ], [
Packit Service 2a3f3d
       AC_MSG_ERROR([libsystemd is enabled but could not be found])
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
    AS_IF([ test x$have_libsystemd = xyes], [
Packit Service 2a3f3d
        AC_DEFINE([HAVE_LIBSYSTEMD], 1, [Define if we have libsystemd.pc])
Packit Service 2a3f3d
        PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd])
Packit Service 2a3f3d
        with_libsystemd=yes
Packit Service 2a3f3d
    ], [
Packit Service 2a3f3d
        with_libsystemd=no
Packit Service 2a3f3d
    ])
Packit Service 2a3f3d
], [ with_libsystemd=no ])
Packit Service 2a3f3d
Packit Service 2a3f3d
AS_IF([test "x$with_libsystemd" = "xyes"], [
Packit Service 2a3f3d
  AC_ARG_WITH([systemdsystemunitdir],
Packit Service 2a3f3d
              AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
Packit Service 2a3f3d
              [],
Packit Service 2a3f3d
              [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
Packit Service 2a3f3d
  AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
Packit Service 2a3f3d
    AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
Packit Service 2a3f3d
  ])
Packit Service 2a3f3d
  AC_ARG_WITH([systemdsystemgeneratordir],
Packit Service 2a3f3d
              AS_HELP_STRING([--with-systemdsystemgeneratordir=DIR], [Directory for systemd generators]),
Packit Service 2a3f3d
              [],
Packit Service 2a3f3d
              [with_systemdsystemgeneratordir=$($PKG_CONFIG --variable=systemdsystemgeneratordir systemd)])
Packit Service 2a3f3d
  AS_IF([test "x$with_systemdsystemgeneratordir" != "xno"], [
Packit Service 2a3f3d
    AC_SUBST([systemdsystemgeneratordir], [$with_systemdsystemgeneratordir])
Packit Service 2a3f3d
  ])
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_SYSTEMD, test x$with_libsystemd = xyes)
Packit Service 2a3f3d
dnl If we have both, we use the "new /var" model with ostree-system-generator
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_SYSTEMD_AND_LIBMOUNT,[test x$with_libsystemd = xyes && test x$with_libmount = xyes])
Packit Service 2a3f3d
AM_COND_IF(BUILDOPT_SYSTEMD_AND_LIBMOUNT,
Packit Service 2a3f3d
  AC_DEFINE([BUILDOPT_LIBSYSTEMD_AND_LIBMOUNT], 1, [Define if systemd and libmount]))
Packit Service 2a3f3d
if test x$with_libsystemd = xyes; then OSTREE_FEATURES="$OSTREE_FEATURES systemd"; fi
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(builtin-grub2-mkconfig,
Packit Service 2a3f3d
            AS_HELP_STRING([--with-builtin-grub2-mkconfig],
Packit Service 2a3f3d
                           [Use a builtin minimal grub2-mkconfig to generate a GRUB2 configuration file (default: no)]),,
Packit Service 2a3f3d
              [with_builtin_grub2_mkconfig=no])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_BUILTIN_GRUB2_MKCONFIG, test x$with_builtin_grub2_mkconfig = xyes)
Packit Service 2a3f3d
AM_COND_IF(BUILDOPT_BUILTIN_GRUB2_MKCONFIG,
Packit Service 2a3f3d
           AC_DEFINE([USE_BUILTIN_GRUB2_MKCONFIG], 1, [Define if using internal ostree-grub-generator]))
Packit Service 2a3f3d
AC_ARG_WITH(grub2-mkconfig-path,
Packit Service 2a3f3d
            AS_HELP_STRING([--with-grub2-mkconfig-path],
Packit Service 2a3f3d
                           [Path to grub2-mkconfig]))
Packit Service 2a3f3d
AS_IF([test x$with_grub2_mkconfig_path = x], [
Packit Service 2a3f3d
  dnl Otherwise, look for the path to the system generator.  On some
Packit Service 2a3f3d
  dnl distributions GRUB2 *-mkconfig executable has 'grub2' prefix and
Packit Service 2a3f3d
  dnl on some 'grub'.  We default to grub2-mkconfig.
Packit Service 2a3f3d
  AC_CHECK_PROGS(GRUB2_MKCONFIG, [grub2-mkconfig grub-mkconfig], [grub2-mkconfig])
Packit Service 2a3f3d
],[GRUB2_MKCONFIG=$with_grub2_mkconfig_path])
Packit Service 2a3f3d
AC_DEFINE_UNQUOTED([GRUB2_MKCONFIG_PATH], ["$GRUB2_MKCONFIG"], [The system grub2-mkconfig executable name])
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_ARG_WITH(static-compiler,
Packit Service 2a3f3d
            AS_HELP_STRING([--with-static-compiler],
Packit Service 2a3f3d
                           [Use the given compiler to build ostree-prepare-root statically linked (default: no)]),,
Packit Service 2a3f3d
              [with_static_compiler=no])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_USE_STATIC_COMPILER, test "x$with_static_compiler" != xno)
Packit Service 2a3f3d
AC_SUBST(STATIC_COMPILER, $with_static_compiler)
Packit Service 2a3f3d
Packit Service 2a3f3d
dnl for tests (but we can't use asan with gjs or any introspection,
Packit Service 2a3f3d
dnl see https://github.com/google/sanitizers/wiki/AddressSanitizerAsDso for more info)
Packit Service 2a3f3d
AS_IF([test "x$found_introspection" = xyes && test x$using_asan != xyes], [
Packit Service 2a3f3d
  AC_PATH_PROG(GJS, [gjs])
Packit Service 2a3f3d
  if test -n "$GJS"; then
Packit Service 2a3f3d
    have_gjs=yes
Packit Service 2a3f3d
  else
Packit Service 2a3f3d
    have_gjs=no
Packit Service 2a3f3d
  fi
Packit Service 2a3f3d
], [have_gjs=no])
Packit Service 2a3f3d
AM_CONDITIONAL(BUILDOPT_GJS, test x$have_gjs = xyes)
Packit Service 2a3f3d
Packit Service 2a3f3d
# Do we enable building experimental (non-stable) API?
Packit Service 2a3f3d
# The OSTREE_ENABLE_EXPERIMENTAL_API #define is used internally and in public
Packit Service 2a3f3d
# headers, so any consumer of libostree who wants to use experimental API must
Packit Service 2a3f3d
#    #define OSTREE_ENABLE_EXPERIMENTAL_API 1
Packit Service 2a3f3d
# before including libostree headers. This means the name in the AC_DEFINE below
Packit Service 2a3f3d
# is public API.
Packit Service 2a3f3d
AC_ARG_ENABLE([experimental-api],
Packit Service 2a3f3d
  [AS_HELP_STRING([--enable-experimental-api],
Packit Service 2a3f3d
                  [Enable unstable experimental API in libostree [default=no]])],,
Packit Service 2a3f3d
  [enable_experimental_api=no])
Packit Service 2a3f3d
AS_IF([test x$enable_experimental_api = xyes],
Packit Service 2a3f3d
  [AC_DEFINE([OSTREE_ENABLE_EXPERIMENTAL_API],[1],[Define if experimental API should be enabled])
Packit Service 2a3f3d
   OSTREE_FEATURES="$OSTREE_FEATURES experimental"]
Packit Service 2a3f3d
)
Packit Service 2a3f3d
AM_CONDITIONAL([ENABLE_EXPERIMENTAL_API],[test x$enable_experimental_api = xyes])
Packit Service 2a3f3d
AM_CONDITIONAL([BUILDOPT_IS_DEVEL_BUILD],[test x$is_release_build != xyes])
Packit Service 2a3f3d
AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD],
Packit Service 2a3f3d
            AC_DEFINE([BUILDOPT_IS_DEVEL_BUILD], [1], [Define if doing a development build])
Packit Service 2a3f3d
            release_build_type=devel,
Packit Service 2a3f3d
            release_build_type=release)
Packit Service 2a3f3d
OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type"
Packit Service 2a3f3d
Packit Service 2a3f3d
# P2P API is public in OSTree >= 2018.6
Packit Service 2a3f3d
OSTREE_FEATURES="$OSTREE_FEATURES p2p"
Packit Service 2a3f3d
Packit Service 2a3f3d
# Strip leading whitespace
Packit Service 2a3f3d
OSTREE_FEATURES=$(echo ${OSTREE_FEATURES})
Packit Service 2a3f3d
Packit Service 2a3f3d
AC_CONFIG_FILES([
Packit Service 2a3f3d
Makefile
Packit Service 2a3f3d
apidoc/Makefile
Packit Service 2a3f3d
src/libostree/ostree-1.pc
Packit Service 2a3f3d
src/libostree/ostree-version.h
Packit Service 2a3f3d
])
Packit Service 2a3f3d
AC_OUTPUT
Packit Service 2a3f3d
Packit Service 2a3f3d
echo "
Packit Service 2a3f3d
    libostree $VERSION ($release_build_type)
Packit Service 2a3f3d
    features: $OSTREE_FEATURES
Packit Service 2a3f3d
    ===============
Packit Service 2a3f3d
Packit Service 2a3f3d
Packit Service 2a3f3d
    introspection:                                $found_introspection
Packit Service 2a3f3d
    Rust (internal oxidation):                    $rust_debug_release
Packit Service 2a3f3d
    rofiles-fuse:                                 $enable_rofiles_fuse
Packit Service 2a3f3d
    HTTP backend:                                 $fetcher_backend
Packit Service 2a3f3d
    \"ostree trivial-httpd\":                       $enable_trivial_httpd_cmdline
Packit Service 2a3f3d
    SELinux:                                      $with_selinux
Packit Service 2a3f3d
    fs-verity:                                    $ac_cv_header_linux_fsverity_h
Packit Service 2a3f3d
    cryptographic checksums:                      $with_crypto
Packit Service 2a3f3d
    systemd:                                      $with_libsystemd
Packit Service 2a3f3d
    libmount:                                     $with_libmount
Packit Service 2a3f3d
    libsodium (ed25519 signatures):               $with_ed25519_libsodium
Packit Service 2a3f3d
    libarchive (parse tar files directly):        $with_libarchive
Packit Service 2a3f3d
    static deltas:                                yes (always enabled now)
Packit Service 2a3f3d
    O_TMPFILE:                                    $enable_otmpfile
Packit Service 2a3f3d
    wrpseudo-compat:                              $enable_wrpseudo_compat
Packit Service 2a3f3d
    man pages (xsltproc):                         $enable_man
Packit Service 2a3f3d
    api docs (gtk-doc):                           $enable_gtk_doc
Packit Service 2a3f3d
    installed tests:                              $enable_installed_tests
Packit Service 2a3f3d
    gjs-based tests:                              $have_gjs
Packit Service 2a3f3d
    dracut:                                       $with_dracut
Packit Service 2a3f3d
    mkinitcpio:                                   $with_mkinitcpio
Packit Service 2a3f3d
    Static compiler for ostree-prepare-root:      $with_static_compiler
Packit Service 2a3f3d
    Experimental API                              $enable_experimental_api"
Packit Service 2a3f3d
AS_IF([test x$with_builtin_grub2_mkconfig = xyes], [
Packit Service 2a3f3d
    echo "    builtin grub2-mkconfig (instead of system):   $with_builtin_grub2_mkconfig"
Packit Service 2a3f3d
], [
Packit Service 2a3f3d
    echo "    grub2-mkconfig path:                          $GRUB2_MKCONFIG"
Packit Service 2a3f3d
])
Packit Service 2a3f3d
echo ""