1 dnl Autoconf configure script for Cygwin.
2 dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
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.
15 INSTALL=`cd $srcdir/..; echo $(pwd)/install-sh -c`
19 dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
20 dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
21 dnl are probably using a cross compiler, which will not be able to fully
22 dnl link an executable. This should really be fixed in autoconf
25 AC_DEFUN(LIB_AC_PROG_CC,
26 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
27 AC_CHECK_TOOL(CC, gcc, gcc)
28 if test -z "$CC"; then
29 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
30 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
35 if test $ac_cv_prog_gcc = yes; then
37 dnl Check whether -g works, even if CFLAGS is set, in case the package
38 dnl plays around with CFLAGS (such as to build both debugging and
39 dnl normal versions of a library), tasteless as that idea is.
40 ac_test_CFLAGS="${CFLAGS+set}"
41 ac_save_CFLAGS="$CFLAGS"
44 if test "$ac_test_CFLAGS" = set; then
45 CFLAGS="$ac_save_CFLAGS"
46 elif test $ac_cv_prog_cc_g = yes; then
53 test "${CFLAGS+set}" = set || CFLAGS="-g"
57 AC_DEFUN(LIB_AC_PROG_CXX,
58 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
59 AC_CHECK_TOOL(CXX, g++, g++)
60 if test -z "$CXX"; then
61 AC_CHECK_PROG(CXX, c++, c++, , , )
62 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
75 [ --enable-server Build a cygwin DLL which can communicate with cygserver],
76 [case "${enableval}" in
82 SUBDIRS='cygwin w32api'
83 test -d $srcdir/mingw && SUBDIRS="mingw $SUBDIRS"
85 case "$with_cross_host" in
87 # test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
88 # test -d $srcdir/zlib && SUBDIRS="$SUBDIRS zlib"
89 # test -d $srcdir/subauth && SUBDIRS="$SUBDIRS subauth"
90 test -n "$use_cygserver" -a -d $srcdir/cygserver && SUBDIRS="$SUBDIRS cygserver"
91 SUBDIRS="$SUBDIRS utils doc"
95 AC_CONFIG_SUBDIRS($SUBDIRS)