1 dnl Copyright (c) 2000, Red Hat, Inc.
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 2 of the License, or
6 dnl (at your option) any later version.
8 dnl A copy of the GNU General Public License can be found at
9 dnl http://www.gnu.org/
11 dnl Written by Christopher Faylor <cgf@redhat.com>
12 dnl and Robert Collins <rbtcollins@hotmail.com>
14 dnl Autoconf configure script for Cygwin utilities.
16 dnl Process this file with autoconf to produce a configure script.
18 AC_INIT([setup], [0], [cygwin-apps@cygwin.com])
20 AC_CONFIG_AUX_DIR([cfgaux])
21 AM_INIT_AUTOMAKE([1.12 subdir-objects foreign no-define -Wall -Wno-portability])
22 dnl AM_CONFIG_HEADER(include/autoconf.h)
23 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES(yes)])
24 AC_CONFIG_SRCDIR([Makefile.in])
26 AC_MSG_CHECKING([Whether to build inilint])
27 AC_ARG_ENABLE(inilint,
28 AC_HELP_STRING([--enable-inilint],
29 [Build the inilint tool]),
30 ac_cv_enable_inilint=$enableval, ac_cv_enable_inilint=no)
31 AC_MSG_RESULT([$ac_cv_enable_inilint])
32 if test $ac_cv_enable_inilint = yes; then
33 INILINT="inilint\$(EXEEXT)"
48 AC_CHECK_TOOL(WINDRES, windres, windres)
49 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
51 dnl dependencies we can check for using pkgconfig
52 PKG_CHECK_MODULES(ZLIB, [zlib])
53 PKG_CHECK_MODULES(LZMA, [liblzma])
54 PKG_CHECK_MODULES(ZSTD, [libzstd])
55 PKG_CHECK_MODULES(LIBSOLV, [libsolv])
57 dnl dependencies we need to check for by hand
58 export LIBGCRYPT_CONFIG=$($CC --print-sysroot)/mingw/bin/libgcrypt-config
63 AC_MSG_CHECKING([for bzip2])
64 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
65 AC_MSG_RESULT($HAVE_BZ2)
67 if test "x$HAVE_BZ2" = "xno"; then
68 AC_MSG_ERROR([bzip2 not found])
74 dnl configure in libgetopt++
75 prefix=`pwd`/inst; mkdir -p "$prefix"
77 ac_configure_args="$ac_configure_args --disable-shared"
78 AC_CONFIG_SUBDIRS(libgetopt++)
90 AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts])
96 AC_CONFIG_FILES([Makefile tests/Makefile])