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])
29 AC_PROG_LEX([noyywrap])
35 AC_CHECK_TOOL(WINDRES, windres, windres)
36 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
38 dnl dependencies we can check for using pkgconfig
39 PKG_CHECK_MODULES(ZLIB, [zlib])
40 PKG_CHECK_MODULES(LZMA, [liblzma])
41 PKG_CHECK_MODULES(ZSTD, [libzstd])
42 PKG_CHECK_MODULES(LIBSOLV, [libsolv])
44 dnl dependencies we need to check for by hand
45 export LIBGCRYPT_CONFIG=$($CC --print-sysroot)/mingw/bin/libgcrypt-config
50 AC_MSG_CHECKING([for bzip2])
51 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
52 AC_MSG_RESULT($HAVE_BZ2)
54 if test "x$HAVE_BZ2" = "xno"; then
55 AC_MSG_ERROR([bzip2 not found])
61 dnl configure in libgetopt++
62 prefix=`pwd`/inst; mkdir -p "$prefix"
64 ac_configure_args="$ac_configure_args --disable-shared"
65 AC_CONFIG_SUBDIRS(libgetopt++)
77 AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts])
83 dnl check exception personality
84 AC_MSG_CHECKING([compiler exception personality])
89 #ifndef __USING_SJLJ_EXCEPTIONS__
90 #error not using sjlj exceptions
94 [AC_MSG_RESULT([ok])],
95 [AC_MSG_FAILURE([Must not be built with a compiler which uses dwarf2 exception handling])])
97 AC_CONFIG_FILES([Makefile tests/Makefile])