Create XZ compressed archive using git ls-files
[cygwin-setup.git] / configure.ac
blob32a3b0179bcb85782b8a91be866a5c92391b6fbd
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 $Id$
15 dnl
16 dnl Autoconf configure script for Cygwin utilities.
17 dnl
18 dnl Process this file with autoconf to produce a configure script.
20 AC_INIT([setup], [0], [cygwin-apps@cygwin.com])
21 AC_PREREQ(2.60)
22 AC_CONFIG_AUX_DIR([cfgaux])
23 AM_INIT_AUTOMAKE([1.12 subdir-objects foreign no-define -Wall -Wno-portability])
24 dnl AM_CONFIG_HEADER(include/autoconf.h)
25 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES(yes)])
26 AC_CONFIG_SRCDIR([Makefile.in])
27 AC_REVISION($Revision$)dnl
29 AC_MSG_CHECKING([Whether to build inilint])
30 AC_ARG_ENABLE(inilint,
31             AC_HELP_STRING([--enable-inilint],
32                            [Build the inilint tool]),
33             ac_cv_enable_inilint=$enableval, ac_cv_enable_inilint=no)
34 AC_MSG_RESULT([$ac_cv_enable_inilint])
35 if test $ac_cv_enable_inilint = yes; then
36   INILINT="inilint\$(EXEEXT)"
37 else
38   INILINT=
40 AC_SUBST(INILINT)
42 AC_LANG_CPLUSPLUS
43 AC_PROG_CXX
44 AM_PROG_CC_C_O
45 AM_PROG_LEX
46 AC_PROG_YACC
47 AC_CANONICAL_BUILD
48 AC_CANONICAL_HOST
49 AC_PROG_LIBTOOL
51 dnl AC_CHECK_TOOL(AR, ar, ar)
52 dnl AC_SUBST(AR)
53 dnl AC_CHECK_TOOL(AS, as, as)
54 dnl AC_SUBST(AS)
55 dnl AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
56 dnl AC_SUBST(RANLIB)
57 dnl AC_CHECK_TOOL(LD, ld, ld)
58 dnl AC_SUBST(LD)
59 dnl AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
60 dnl AC_SUBST(DLLTOOL)
61 AC_CHECK_TOOL(WINDRES, windres, windres)
62 AC_SUBST(WINDRES)
63 dnl AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
64 dnl AC_SUBST(OBJCOPY)
66 AC_CHECK_HEADERS(alloca.h \
67                  errno.h \
68                  string \
69                  string.h )
71 AC_CHECK_HEADER(zlib.h, , missing_deps="$missing_deps zlib")
72 AC_CHECK_HEADER(bzlib.h, , missing_deps="$missing_deps libbz2")
73 AC_CHECK_HEADER(lzma.h, , missing_deps="$missing_deps liblzma")
74 AC_CHECK_HEADER(gcrypt.h, , missing_deps="$missing_deps libgcrypt")
76 if test -n "$missing_deps"; then
77         AC_MSG_ERROR([missing prerequisites: $missing_deps])
80 prefix=`pwd`/inst; mkdir -p "$prefix"
81 exec_prefix=$prefix
82 ac_configure_args="$ac_configure_args --disable-shared"
83 AC_CONFIG_SUBDIRS(libgetopt++)
85 dnl add portability sources to inilint
86 case "$host" in
87 i?86-*-mingw32)
88   SETUP="setup"
89   ;;
90 x86_64-*-mingw32)
91   SETUP="setup"
92   ;;
94   AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts])
95   ;;
96 esac
97 AC_SUBST(SETUP)
99 AC_CONFIG_FILES([Makefile tests/Makefile])
100 AC_OUTPUT