]> sourceware.org Git - newlib-cygwin.git/blame - winsup/configure.in
* subauth: New subdirectory.
[newlib-cygwin.git] / winsup / configure.in
CommitLineData
1fd5e000 1dnl Autoconf configure script for Cygwin.
37e7e1a3 2dnl Copyright 1996, 1997, 1998, 1999, 2000 Red Hat, Inc.
1fd5e000
CF
3dnl
4dnl This file is part of Cygwin.
5dnl
6dnl This software is a copyrighted work licensed under the terms of the
7dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
8dnl details.
9dnl
10dnl Process this file with autoconf to produce a configure script.
11
12AC_PREREQ(2.12)dnl
13AC_INIT(Makefile.in)
14
15dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
16dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
17dnl are probably using a cross compiler, which will not be able to fully
18dnl link an executable. This should really be fixed in autoconf
19dnl itself.
20
21AC_DEFUN(LIB_AC_PROG_CC,
22[AC_BEFORE([$0], [AC_PROG_CPP])dnl
23AC_CHECK_TOOL(CC, gcc, gcc)
24if test -z "$CC"; then
25 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
26 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
27fi
28
29AC_PROG_CC_GNU
30
31if test $ac_cv_prog_gcc = yes; then
32 GCC=yes
33dnl Check whether -g works, even if CFLAGS is set, in case the package
34dnl plays around with CFLAGS (such as to build both debugging and
35dnl normal versions of a library), tasteless as that idea is.
36 ac_test_CFLAGS="${CFLAGS+set}"
37 ac_save_CFLAGS="$CFLAGS"
38 CFLAGS=
39 AC_PROG_CC_G
40 if test "$ac_test_CFLAGS" = set; then
41 CFLAGS="$ac_save_CFLAGS"
42 elif test $ac_cv_prog_cc_g = yes; then
43 CFLAGS="-g -O2"
44 else
45 CFLAGS="-O2"
46 fi
1fd5e000
CF
47else
48 GCC=
49 test "${CFLAGS+set}" = set || CFLAGS="-g"
50fi
51])
52
8494f61e
CF
53AC_DEFUN(LIB_AC_PROG_CXX,
54[AC_BEFORE([$0], [AC_PROG_CPP])dnl
55AC_CHECK_TOOL(CXX, g++, g++)
56if test -z "$CXX"; then
57 AC_CHECK_PROG(CXX, c++, c++, , , )
58 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
59fi
60
61CXXFLAGS='$(CFLAGS)'
62])
63
1fd5e000
CF
64AC_CANONICAL_SYSTEM
65
66LIB_AC_PROG_CC
8494f61e 67LIB_AC_PROG_CXX
1fd5e000 68
fa2ba858 69SUBDIRS='w32api cygwin mingw'
2e6d8441
CF
70case "$with_cross_host" in
71 ""|*cygwin*)
f8415f61 72 test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
2e6d8441 73 test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
3c1fb7ac 74 SUBDIRS="$SUBDIRS utils doc testsuite subauth"
2e6d8441
CF
75 ;;
76esac
77
1fd5e000 78AC_CONFIG_SUBDIRS($SUBDIRS)
2e6d8441 79
1fd5e000
CF
80AC_PROG_MAKE_SET
81
82AC_SUBST(SUBDIRS)
83AC_OUTPUT(Makefile)
This page took 0.050869 seconds and 5 git commands to generate.