]> cygwin.com Git - cygwin-apps/setup.git/blame - configure.in
* net.cc (do_net): Default to direct download.
[cygwin-apps/setup.git] / configure.in
CommitLineData
37ee316b
CF
1dnl Copyright (c) 2000, Red Hat, Inc.
2dnl
3dnl This program is free software; you can redistribute it and/or modify
4dnl it under the terms of the GNU General Public License as published by
5dnl the Free Software Foundation; either version 2 of the License, or
6dnl (at your option) any later version.
7dnl
8dnl A copy of the GNU General Public License can be found at
9dnl http://www.gnu.org/
739457f4 10dnl
6dfbe297 11dnl Written by Christopher Faylor <cgf@redhat.com>
739457f4 12
37ee316b
CF
13dnl Autoconf configure script for Cygwin utilities.
14dnl
739457f4
CF
15dnl Process this file with autoconf to produce a configure script.
16
17AC_PREREQ(2.12)
18
19AC_INIT(Makefile.in)
20
21dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
22dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
23dnl are probably using a cross compiler, which will not be able to fully
24dnl link an executable. This should really be fixed in autoconf
25dnl itself.
26
27AC_DEFUN(LIB_AC_PROG_CC,
28[AC_BEFORE([$0], [AC_PROG_CPP])dnl
29AC_CHECK_PROG(CC, gcc, gcc)
30if test -z "$CC"; then
31 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
32 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
33fi
34
35AC_PROG_CC_GNU
36
37if test $ac_cv_prog_gcc = yes; then
38 GCC=yes
39dnl Check whether -g works, even if CFLAGS is set, in case the package
40dnl plays around with CFLAGS (such as to build both debugging and
41dnl normal versions of a library), tasteless as that idea is.
42 ac_test_CFLAGS="${CFLAGS+set}"
43 ac_save_CFLAGS="$CFLAGS"
44 CFLAGS=
45 AC_PROG_CC_G
46 if test "$ac_test_CFLAGS" = set; then
47 CFLAGS="$ac_save_CFLAGS"
48 elif test $ac_cv_prog_cc_g = yes; then
49 CFLAGS="-g -O2"
50 else
51 CFLAGS="-O2"
52 fi
53else
54 GCC=
55 test "${CFLAGS+set}" = set || CFLAGS="-g"
56fi
57])
58
72826a5b
CF
59AC_DEFUN(LIB_AC_PROG_CXX,
60[AC_BEFORE([$0], [AC_PROG_CPP])dnl
61AC_CHECK_TOOL(CXX, g++, g++)
62if test -z "$CXX"; then
63 AC_CHECK_PROG(CXX, c++, c++, , , )
64 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
65fi
66
67CXXFLAGS='$(CFLAGS)'
68])
739457f4
CF
69
70AC_CANONICAL_SYSTEM
72826a5b
CF
71
72LIB_AC_PROG_CC
73LIB_AC_PROG_CXX
74
739457f4
CF
75AC_ARG_PROGRAM
76
77if test "x$cross_compiling" = "xyes"; then
78 if test "x$program_transform_name" = "xs,x,x,"; then
79 program_transform_name=""
80 fi
81 if test "x$program_transform_name" = "x"; then
82 program_transform_name="s,^,$host-,"
83 else
84 program_transform_name="$program_transform_name -e s,^,$host-,"
85 fi
86fi
87
88AC_PROG_INSTALL
89
90AC_EXEEXT
91
92AC_CHECK_TOOL(AR, ar, ar)
93AC_SUBST(AR)
94AC_CHECK_TOOL(AS, as, as)
95AC_SUBST(AS)
96AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
97AC_SUBST(RANLIB)
98AC_CHECK_TOOL(LD, ld, ld)
99AC_SUBST(LD)
100AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
101AC_SUBST(DLLTOOL)
102AC_CHECK_TOOL(WINDRES, windres, windres)
103AC_SUBST(WINDRES)
4306b490
CF
104AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
105AC_SUBST(OBJCOPY)
739457f4
CF
106
107SUBDIRS="zlib"
108AC_CONFIG_SUBDIRS($SUBDIRS)
109
110AC_OUTPUT(Makefile)
This page took 0.033864 seconds and 5 git commands to generate.