1 dnl Copyright (c) 2000, Red Hat, Inc.
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.
8 dnl A copy of the GNU General Public License can be found at
9 dnl http://www.gnu.org/
11 dnl Written by Christopher Faylor <cgf@redhat.com>
13 dnl Autoconf configure script for Cygwin utilities.
15 dnl Process this file with autoconf to produce a configure script.
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
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])
37 if test $ac_cv_prog_gcc = yes; then
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"
46 if test "$ac_test_CFLAGS" = set; then
47 CFLAGS="$ac_save_CFLAGS"
48 elif test $ac_cv_prog_cc_g = yes; then
55 test "${CFLAGS+set}" = set || CFLAGS="-g"
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])
77 if test "x$cross_compiling" = "xyes"; then
78 if test "x$program_transform_name" = "xs,x,x,"; then
79 program_transform_name=""
81 if test "x$program_transform_name" = "x"; then
82 program_transform_name="s,^,$host-,"
84 program_transform_name="$program_transform_name -e s,^,$host-,"
92 AC_CHECK_TOOL(AR, ar, ar)
94 AC_CHECK_TOOL(AS, as, as)
96 AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
98 AC_CHECK_TOOL(LD, ld, ld)
100 AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
102 AC_CHECK_TOOL(WINDRES, windres, windres)
104 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
108 AC_CONFIG_SUBDIRS($SUBDIRS)