]> cygwin.com Git - cygwin-apps/setup.git/blob - configure.in
* choose.cc (paint): Use system background color for text output.
[cygwin-apps/setup.git] / configure.in
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
13 dnl Autoconf configure script for Cygwin utilities.
14 dnl
15 dnl Process this file with autoconf to produce a configure script.
16
17 AC_PREREQ(2.12)
18
19 AC_INIT(Makefile.in)
20
21 dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
22 dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
23 dnl are probably using a cross compiler, which will not be able to fully
24 dnl link an executable. This should really be fixed in autoconf
25 dnl itself.
26
27 AC_DEFUN(LIB_AC_PROG_CC,
28 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
29 AC_CHECK_PROG(CC, gcc, gcc)
30 if 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])
33 fi
34
35 AC_PROG_CC_GNU
36
37 if test $ac_cv_prog_gcc = yes; then
38 GCC=yes
39 dnl Check whether -g works, even if CFLAGS is set, in case the package
40 dnl plays around with CFLAGS (such as to build both debugging and
41 dnl 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
53 else
54 GCC=
55 test "${CFLAGS+set}" = set || CFLAGS="-g"
56 fi
57 ])
58
59 AC_DEFUN(LIB_AC_PROG_CXX,
60 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
61 AC_CHECK_TOOL(CXX, g++, g++)
62 if test -z "$CXX"; then
63 AC_CHECK_PROG(CXX, c++, c++, , , )
64 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
65 fi
66
67 CXXFLAGS='$(CFLAGS)'
68 ])
69
70 AC_CANONICAL_SYSTEM
71
72 LIB_AC_PROG_CC
73 LIB_AC_PROG_CXX
74
75 AC_ARG_PROGRAM
76
77 if 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
86 fi
87
88 AC_PROG_INSTALL
89
90 AC_EXEEXT
91
92 AC_CHECK_TOOL(AR, ar, ar)
93 AC_SUBST(AR)
94 AC_CHECK_TOOL(AS, as, as)
95 AC_SUBST(AS)
96 AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
97 AC_SUBST(RANLIB)
98 AC_CHECK_TOOL(LD, ld, ld)
99 AC_SUBST(LD)
100 AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
101 AC_SUBST(DLLTOOL)
102 AC_CHECK_TOOL(WINDRES, windres, windres)
103 AC_SUBST(WINDRES)
104 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
105 AC_SUBST(OBJCOPY)
106
107 SUBDIRS="zlib"
108 AC_CONFIG_SUBDIRS($SUBDIRS)
109
110 AC_OUTPUT(Makefile)
This page took 0.040889 seconds and 6 git commands to generate.