OSDN Git Service

* fhandler.h (fhandler_dev_raw): Add definition for method
[pf3gnuchains/pf3gnuchains4x.git] / winsup / utils / configure.in
1 dnl Autoconf configure script for Cygwin utilities.
2 dnl Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
3 dnl
4 dnl This file is part of Cygwin.
5 dnl
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
8 dnl details.
9
10 dnl Process this file with autoconf to produce a configure script.
11
12 AC_PREREQ(2.12)
13
14 AC_INIT(mount.cc)
15
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
20 dnl itself.
21
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])
28 fi
29
30 AC_PROG_CC_GNU
31
32 if test $ac_cv_prog_gcc = yes; then
33   GCC=yes
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"
39   CFLAGS=
40   AC_PROG_CC_G
41   if test "$ac_test_CFLAGS" = set; then
42     CFLAGS="$ac_save_CFLAGS"
43   elif test $ac_cv_prog_cc_g = yes; then
44     CFLAGS="-g -O2"
45   else
46     CFLAGS="-O2"
47   fi
48 else
49   GCC=
50   test "${CFLAGS+set}" = set || CFLAGS="-g"
51 fi
52 ])
53
54 LIB_AC_PROG_CC
55
56 AC_CANONICAL_SYSTEM
57 AC_ARG_PROGRAM
58
59 if test "x$cross_compiling" = "xyes"; then
60   if test "x$program_transform_name" = "xs,x,x,"; then
61     program_transform_name=""
62   fi
63   if test "x$program_transform_name" = "x"; then
64     program_transform_name="s,^,$host-,"
65   else
66     program_transform_name="$program_transform_name -e s,^,$host-,"
67   fi
68 fi
69
70 AC_PROG_INSTALL
71
72 AM_EXEEXT
73
74 AC_OUTPUT(Makefile)
75