]>
Commit | Line | Data |
---|---|---|
37ee316b CF |
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/ | |
739457f4 | 10 | dnl |
6dfbe297 | 11 | dnl Written by Christopher Faylor <cgf@redhat.com> |
f6100b6f RC |
12 | dnl and Robert Collins <rbtcollins@hotmail.com> |
13 | dnl | |
14 | dnl $Id$ | |
15 | dnl | |
37ee316b CF |
16 | dnl Autoconf configure script for Cygwin utilities. |
17 | dnl | |
739457f4 CF |
18 | dnl Process this file with autoconf to produce a configure script. |
19 | ||
dacb1ebd BD |
20 | AC_INIT([setup], [0], [cygwin-apps@cygwin.com]) |
21 | AC_PREREQ(2.60) | |
22 | AC_CONFIG_AUX_DIR([cfgaux]) | |
443b9db6 | 23 | AM_INIT_AUTOMAKE([1.12 subdir-objects foreign no-define -Wall -Wno-portability]) |
f6100b6f | 24 | dnl AM_CONFIG_HEADER(include/autoconf.h) |
e07b6f3d | 25 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES(yes)]) |
db04fc41 RC |
26 | AC_CONFIG_SRCDIR([Makefile.in]) |
27 | AC_REVISION($Revision$)dnl | |
28 | ||
19911586 RC |
29 | AC_MSG_CHECKING([Whether to build inilint]) |
30 | AC_ARG_ENABLE(inilint, | |
f8dcce01 MB |
31 | AC_HELP_STRING([--enable-inilint], |
32 | [Build the inilint tool]), | |
33 | ac_cv_enable_inilint=$enableval, ac_cv_enable_inilint=no) | |
19911586 RC |
34 | AC_MSG_RESULT([$ac_cv_enable_inilint]) |
35 | if test $ac_cv_enable_inilint = yes; then | |
aa1e3b4d | 36 | INILINT="inilint\$(EXEEXT)" |
19911586 RC |
37 | else |
38 | INILINT= | |
39 | fi | |
40 | AC_SUBST(INILINT) | |
41 | ||
f6100b6f | 42 | AC_LANG_CPLUSPLUS |
db04fc41 | 43 | AC_PROG_CXX |
f6100b6f RC |
44 | AM_PROG_CC_C_O |
45 | AM_PROG_LEX | |
46 | AC_PROG_YACC | |
db04fc41 RC |
47 | AC_CANONICAL_BUILD |
48 | AC_CANONICAL_HOST | |
6908b7d7 | 49 | AC_PROG_LIBTOOL |
739457f4 | 50 | |
739457f4 | 51 | AC_CHECK_TOOL(WINDRES, windres, windres) |
77ddbf45 | 52 | AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy) |
739457f4 | 53 | |
19911586 RC |
54 | AC_CHECK_HEADERS(alloca.h \ |
55 | errno.h \ | |
56 | string \ | |
57 | string.h ) | |
45e01f23 | 58 | |
c63e8b4a YS |
59 | AC_CHECK_HEADER(zlib.h, , missing_deps="$missing_deps zlib") |
60 | AC_CHECK_HEADER(bzlib.h, , missing_deps="$missing_deps libbz2") | |
61 | AC_CHECK_HEADER(lzma.h, , missing_deps="$missing_deps liblzma") | |
62 | AC_CHECK_HEADER(gcrypt.h, , missing_deps="$missing_deps libgcrypt") | |
63 | ||
64 | if test -n "$missing_deps"; then | |
65 | AC_MSG_ERROR([missing prerequisites: $missing_deps]) | |
66 | fi | |
67 | ||
be6622c0 CF |
68 | prefix=`pwd`/inst; mkdir -p "$prefix" |
69 | exec_prefix=$prefix | |
1cc1fad4 | 70 | ac_configure_args="$ac_configure_args --disable-shared" |
1e0f90f9 | 71 | AC_CONFIG_SUBDIRS(libgetopt++) |
739457f4 | 72 | |
2b48ecd0 | 73 | dnl add portability sources to inilint |
e49fef4d YS |
74 | case "$host" in |
75 | i?86-*-mingw32) | |
76 | SETUP="setup" | |
b9d154a2 | 77 | ARCH="x86" |
e49fef4d YS |
78 | ;; |
79 | x86_64-*-mingw32) | |
a2f2948a | 80 | SETUP="setup" |
b9d154a2 | 81 | ARCH="x86_64" |
2b48ecd0 RC |
82 | ;; |
83 | *) | |
e49fef4d | 84 | AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts]) |
2b48ecd0 RC |
85 | ;; |
86 | esac | |
e49fef4d | 87 | AC_SUBST(SETUP) |
b9d154a2 | 88 | AC_SUBST(ARCH) |
2b48ecd0 | 89 | |
2bbf91cf | 90 | AC_CONFIG_FILES([Makefile tests/Makefile]) |
db04fc41 | 91 | AC_OUTPUT |