2012-11-23 21:22:47 +08:00
|
|
|
dnl This provides configure definitions used by all the cygwin
|
2006-05-25 00:59:03 +08:00
|
|
|
dnl configure.in files.
|
|
|
|
|
2012-11-23 21:22:47 +08:00
|
|
|
AC_DEFUN([AC_CYGWIN_INCLUDES], [
|
|
|
|
: ${ac_cv_prog_CXX:=$CXX}
|
|
|
|
: ${ac_cv_prog_CC:=$CC}
|
|
|
|
|
|
|
|
cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
|
|
|
|
if test -z "$cygwin_headers"; then
|
|
|
|
AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
|
|
|
|
fi
|
|
|
|
|
|
|
|
newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
|
|
|
|
if test -z "$newlib_headers"; then
|
|
|
|
AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
|
2006-05-25 00:59:03 +08:00
|
|
|
fi
|
2012-11-23 21:22:47 +08:00
|
|
|
newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
|
2006-05-25 00:59:03 +08:00
|
|
|
|
Cygwin: Remove recursive configure
There's doesn't seem to be much use in independently distributing these
subdirectories, so allowing them to be independently configured seems
pointless and overcomplicated.
The order in which the subdirectories are built is still a little odd,
as cygwin is linked with libcygserver, and cygserver is then linked with
cygwin. So, we build the cygwin directory first, which invokes a build
of libcygserver in the cygserver directory, and then build in the
cygserver directory to build the cygserver executable.
Drop AC_CONFIGURE_ARGS, since we don't need to recursively call
configure with the same arguments anymore.
Slightly refine when we build utils: Previously we didn't build any
utils if MinGW compiler use was avoided, now we just avoid building
those utils which require that compiler.
Greatly simplify how winsup_srcdir and target_builddir are set, since
we're only configuring from one directory. (These are still kept
absolute, since we don't adjust them where used for being used in a
subdirectory).
Remove configure.cygwin and put it's (greatly reduced) contents inline
in the one place it's used now.
Remove generated configure and aclocal.m4 in subdirectories.
2020-10-06 23:22:02 +08:00
|
|
|
INCLUDES="-I${winsup_srcdir}/cygwin -I${target_builddir}/winsup/cygwin"
|
2020-10-03 21:41:58 +08:00
|
|
|
INCLUDES="${INCLUDES} -isystem ${cygwin_headers}"
|
|
|
|
for h in ${newlib_headers}; do
|
|
|
|
INCLUDES="${INCLUDES} -isystem $h"
|
|
|
|
done
|
|
|
|
AC_SUBST(INCLUDES)
|
2006-05-25 00:59:03 +08:00
|
|
|
])
|
2012-11-23 21:22:47 +08:00
|
|
|
|
|
|
|
AC_SUBST(target_builddir)
|
|
|
|
AC_SUBST(winsup_srcdir)
|