Content-Security-Policy: default-src 'none'
Content-Type: text/plain; charset=UTF-8
Content-Length: 9291
Content-Disposition: inline; filename="configure.ac"
Last-Modified: Mon, 16 Dec 2024 10:55:37 GMT
Expires: Thu, 14 Dec 2034 10:55:37 GMT
ETag: "06e86c209fcd24d7f8821dde096c8855bdbd7176"

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.68)
AC_INIT([GNU Guix],
  [m4_esyscmd([build-aux/git-version-gen .tarball-version])],
  [bug-guix@gnu.org], [guix],
  [https://www.gnu.org/software/guix/])
AC_CONFIG_AUX_DIR([build-aux])

AM_INIT_AUTOMAKE([1.14 gnu silent-rules subdir-objects \
 color-tests parallel-tests -Woverride -Wno-portability])

# Enable silent rules by default.
AM_SILENT_RULES([yes])

AC_CONFIG_SRCDIR([guix.scm])
AC_CONFIG_MACRO_DIR([m4])

dnl For the C++ code.  This must be used early.
AC_USE_SYSTEM_EXTENSIONS

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18.1])

GUIX_SYSTEM_TYPE
GUIX_ASSERT_SUPPORTED_SYSTEM

AC_ARG_WITH(store-dir,
  AC_HELP_STRING([--with-store-dir=PATH],
    [file name of the store (defaults to /gnu/store)]),
  [storedir="$withval"],
  [storedir="/gnu/store"])
AC_SUBST(storedir)

AC_ARG_WITH([bash-completion-dir],
  AC_HELP_STRING([--with-bash-completion-dir=DIR],
    [name of the Bash completion directory]),
  [bashcompletiondir="$withval"],
  [bashcompletiondir='${sysco</td></tr></table>
<table class='tabs'><tr><td>
<a href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>refs</a><a href='/guix/log/gnu/packages/patches/libgnome-encoding.patch'>log</a><a class='active' href='/guix/tree/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>tree</a><a href='/guix/commit/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>commit</a><a href='/guix/diff/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/gnu/packages/patches/libgnome-encoding.patch'>
<input type='hidden' name='id' value='30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/tree/?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>root</a>/<a href='/guix/tree/gnu?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>gnu</a>/<a href='/guix/tree/gnu/packages?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>packages</a>/<a href='/guix/tree/gnu/packages/patches?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>patches</a>/<a href='/guix/tree/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>libgnome-encoding.patch</a></div><div class='content'>blob: c7c352172f6e2923fb77e2247f2c0c1ef015872e (<a href='/guix/about/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>about</a>) (<a href='/guix/plain/gnu/packages/patches/libgnome-encoding.patch?id=30e06c2cee92fa9a9b9e86bb8bf9c3e8d458ef9b'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
</pre></td>
<td class='lines'><pre><code>Remove non-UTF-8 character (this is a NO-BREAK SPACE character, encoded in
ISO-8859-1) to fix build failure with 'glib-mkenums' in GLib 2.54.2+.

Patch from &lt;https://github.com/macports/macports-ports/commit/1f3efc8e65cc060d1701407bd1e56e62e6bd9c55&gt;.

--- a/libgnome/gnome-config.h	2009-04-23 04:29:13.000000000 -0500
+++ b/libgnome/gnome-config.h	2017-10-04 02:17:22.000000000 -0500
@@ -270,7 +270,7 @@ void gnome_config_clean_key_ (const char
 #define gnome_config_private_clean_key(path) \
 	(gnome_config_clean_key_((path),TRUE))
 
-/* returns the true filename of the config file */
+/* returns the true filename of the config file */
 #define gnome_config_get_real_path(path) \
 	(g_build_filename (gnome_user_dir_get(),(path),NULL))
 #define gnome_config_private_get_real_path(path) \
</code></pre></td></tr></table>
</div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
er" = "xyes"], [
if test "x$have_guile_newt" != "xyes"; then
  AC_MSG_ERROR([Guile-newt could not be found; please install it.])
fi
])

AM_CONDITIONAL([ENABLE_INSTALLER],
  [test "x$enable_installer" = "xyes"])

dnl Make sure we have a full-fledged Guile.
GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads])

dnl Make sure we don't suffer from the bug in 'equal?' wrt. syntax objects
dnl found in 2.2.1.  See <https://bugs.gnu.org/29903>.
GUIX_ASSERT_SYNTAX_OBJECT_EQUAL

AC_PROG_SED

dnl Decompressors, for use by the substituter and other modules.
AC_PATH_PROG([GZIP], [gzip])
AC_PATH_PROG([BZIP2], [bzip2])
AC_PATH_PROG([XZ], [xz])
AC_SUBST([GZIP])
AC_SUBST([BZIP2])
AC_SUBST([XZ])

AC_ARG_WITH([nix-prefix],
  [AS_HELP_STRING([--with-nix-prefix=DIR],
    [search for Nix in DIR (for testing purposes and '--disable-daemon' builds)])],
  [case "$withval" in
    yes|no) ;;
    *)
      NIX_PREFIX="$withval"
      PATH="$NIX_PREFIX/bin:$PATH"; export PATH
      AC_SUBST([NIX_PREFIX])
      ;;
   esac],
  [])

AC_PATH_PROG([NIX_HASH], [nix-hash])
if test "x$guix_build_daemon$NIX_HASH" = "xno"; then
   AC_MSG_ERROR([Nix programs not found; please install Nix or use `--with-nix-prefix'.])
fi

AC_ARG_WITH([nixpkgs],
  [AS_HELP_STRING([--with-nixpkgs=DIR],
    [search for Nixpkgs in DIR (for testing purposes only)])],
  [case "$withval" in
    yes|no) AC_MSG_ERROR([Please use `--with-nixpkgs=DIR'.]);;
    *)      NIXPKGS="$withval";;
   esac],
  [])

AC_MSG_CHECKING([for Nixpkgs source tree])
if test -f "$NIXPKGS/default.nix"; then
   AC_MSG_RESULT([$NIXPKGS])
   AC_SUBST([NIXPKGS])
else
   AC_MSG_RESULT([not found])
fi

LIBGCRYPT_LIBDIR="no"
LIBGCRYPT_PREFIX="no"

AC_ARG_WITH([libgcrypt-prefix],
  [AS_HELP_STRING([--with-libgcrypt-prefix=DIR], [search for GNU libgcrypt in DIR])],
  [case "$withval" in
    yes|no)
      ;;
    *)
      LIBGCRYPT_PREFIX="$withval"
      LIBGCRYPT_LIBDIR="$withval/lib"
      ;;
   esac])

AC_ARG_WITH([libgcrypt-libdir],
  [AS_HELP_STRING([--with-libgcrypt-libdir=DIR],
     [search for GNU libgcrypt's shared library in DIR])],
  [case "$withval" in
    yes|no)
      LIBGCRYPT_LIBDIR="no"
      ;;
    *)
      LIBGCRYPT_LIBDIR="$withval"
      ;;
   esac])

dnl If none of the --with-libgcrypt-* options was used, try to determine the
dnl the library directory.
case "x$LIBGCRYPT_PREFIX$LIBGCRYPT_LIBDIR" in
  xnono)
    GUIX_LIBGCRYPT_LIBDIR([LIBGCRYPT_LIBDIR])
    ;;
esac

AC_SUBST([LIBGCRYPT_PREFIX])
AC_SUBST([LIBGCRYPT_LIBDIR])

dnl Library name of zlib suitable for 'dynamic-link'.
GUIX_LIBZ_LIBDIR([libz_libdir])
if test "x$libz_libdir" = "x"; then
  LIBZ="libz"
else
  LIBZ="$libz_libdir/libz"
fi
AC_MSG_CHECKING([for zlib's shared library name])
AC_MSG_RESULT([$LIBZ])
AC_SUBST([LIBZ])

dnl Library name of lzlib suitable for 'dynamic-link'.
GUIX_LIBLZ_FILE_NAME([LIBLZ])
if test "x$LIBLZ" = "x"; then
  LIBLZ="liblz"
else
  # Strip the .so or .so.1 extension since that's what 'dynamic-link' expects.
  LIBLZ="`echo $LIBLZ | sed -es'/\.so\(\.[[0-9.]]\+\)\?//g'`"
fi
AC_SUBST([LIBLZ])

dnl Check for Guile-SSH, for the (guix ssh) module.
GUIX_CHECK_GUILE_SSH
AM_CONDITIONAL([HAVE_GUILE_SSH],
  [test "x$guix_cv_have_recent_guile_ssh" = "xyes"])

AC_CACHE_SAVE

m4_include([config-daemon.ac])

dnl `dot' (from the Graphviz package) is only needed for maintainers.
dnl See `Building from Git' in the manual for more info.
AM_MISSING_PROG([DOT], [dot])

dnl Manual pages.
AM_MISSING_PROG([HELP2MAN], [help2man])

dnl Documentation translation.
AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])

dnl Emacs (optional), for 'etc/indent-code.el'.
AC_PATH_PROG([EMACS], [emacs])
if test "x$EMACS" = x; then
    AC_MSG_WARN([Please install GNU Emacs to use etc/indent-code.el.])
else
    AC_SUBST([EMACS])
    AC_CONFIG_FILES([etc/indent-code.el], [chmod +x etc/indent-code.el])
fi

case "$storedir" in
  /gnu/store)
    ;;
  *)
    AC_MSG_WARN([Using a store directory other than '/gnu/store' will prevent you])
    AC_MSG_WARN([from downloading substitutes from gnu.org.])
    ;;
esac

AC_CONFIG_FILES([Makefile
                 po/guix/Makefile.in
                 po/packages/Makefile.in
                 etc/guix-daemon.cil
                 guix/config.scm])

AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
  [chmod +x pre-inst-env])

AC_OUTPUT
