1 dnl Autoconf configure script for Cygwin utilities.
2 dnl Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
4 dnl This file is part of Cygwin.
6 dnl This software is a copyrighted work licensed under the terms of the
7 dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
10 dnl Process this file with autoconf to produce a configure script.
16 dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
17 dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
18 dnl are probably using a cross compiler, which will not be able to fully
19 dnl link an executable. This should really be fixed in autoconf
22 AC_DEFUN(LIB_AC_PROG_CC,
23 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
24 AC_CHECK_PROG(CC, gcc, gcc)
25 if test -z "$CC"; then
26 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
27 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
32 if test $ac_cv_prog_gcc = yes; then
34 dnl Check whether -g works, even if CFLAGS is set, in case the package
35 dnl plays around with CFLAGS (such as to build both debugging and
36 dnl normal versions of a library), tasteless as that idea is.
37 ac_test_CFLAGS="${CFLAGS+set}"
38 ac_save_CFLAGS="$CFLAGS"
41 if test "$ac_test_CFLAGS" = set; then
42 CFLAGS="$ac_save_CFLAGS"
43 elif test $ac_cv_prog_cc_g = yes; then
50 test "${CFLAGS+set}" = set || CFLAGS="-g"
59 if test "x$cross_compiling" = "xyes"; then
60 if test "x$program_transform_name" = "xs,x,x,"; then
61 program_transform_name=""
63 if test "x$program_transform_name" = "x"; then
64 program_transform_name="s,^,$host-,"
66 program_transform_name="$program_transform_name -e s,^,$host-,"