]> cygwin.com Git - cygwin-apps/setup.git/blob - configure.ac
Add support for ZStandard compression
[cygwin-apps/setup.git] / configure.ac
1 dnl Copyright (c) 2000, Red Hat, Inc.
2 dnl
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.
7 dnl
8 dnl A copy of the GNU General Public License can be found at
9 dnl http://www.gnu.org/
10 dnl
11 dnl Written by Christopher Faylor <cgf@redhat.com>
12 dnl and Robert Collins <rbtcollins@hotmail.com>
13 dnl
14 dnl Autoconf configure script for Cygwin utilities.
15 dnl
16 dnl Process this file with autoconf to produce a configure script.
17
18 AC_INIT([setup], [0], [cygwin-apps@cygwin.com])
19 AC_PREREQ(2.60)
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])
25
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)"
34 else
35 INILINT=
36 fi
37 AC_SUBST(INILINT)
38
39 AC_LANG_CPLUSPLUS
40 AC_PROG_CXX
41 AM_PROG_CC_C_O
42 AM_PROG_LEX
43 AC_PROG_YACC
44 AC_CANONICAL_BUILD
45 AC_CANONICAL_HOST
46 AC_PROG_LIBTOOL
47
48 AC_CHECK_TOOL(WINDRES, windres, windres)
49 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
50
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])
56
57 dnl dependencies we need to check for by hand
58 export LIBGCRYPT_CONFIG=$($CC --print-sysroot)/mingw/bin/libgcrypt-config
59 AM_PATH_LIBGCRYPT
60
61 save_LIBS=$LIBS
62 LIBS="$LIBS -lbz2"
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)
66 LIBS=$save_LIBS
67 if test "x$HAVE_BZ2" = "xno"; then
68 AC_MSG_ERROR([bzip2 not found])
69 else
70 BZ2_LIBS="-lbz2"
71 fi
72 AC_SUBST(BZ2_LIBS)
73
74 dnl configure in libgetopt++
75 prefix=`pwd`/inst; mkdir -p "$prefix"
76 exec_prefix=$prefix
77 ac_configure_args="$ac_configure_args --disable-shared"
78 AC_CONFIG_SUBDIRS(libgetopt++)
79
80 case "$host" in
81 i?86-*-mingw32)
82 SETUP="setup"
83 ARCH="x86"
84 ;;
85 x86_64-*-mingw32)
86 SETUP="setup"
87 ARCH="x86_64"
88 ;;
89 *)
90 AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts])
91 ;;
92 esac
93 AC_SUBST(SETUP)
94 AC_SUBST(ARCH)
95
96 AC_CONFIG_FILES([Makefile tests/Makefile])
97 AC_OUTPUT
This page took 0.039563 seconds and 5 git commands to generate.