1 dnl This provides configure definitions used by all the cygwin
2 dnl configure.in files.
4 AC_DEFUN([AC_CYGWIN_INCLUDES], [
5 : ${ac_cv_prog_CXX:=$CXX}
6 : ${ac_cv_prog_CC:=$CC}
8 cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
9 if test -z "$cygwin_headers"; then
10 AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
13 newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
14 if test -z "$newlib_headers"; then
15 AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
17 newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
19 AM_CPPFLAGS="-U_FORTIFY_SOURCE"
20 AM_CPPFLAGS="${AM_CPPFLAGS} -I${winsup_srcdir}/cygwin/local_includes"
21 AM_CPPFLAGS="${AM_CPPFLAGS} -I${target_builddir}/winsup/cygwin"
22 AM_CPPFLAGS="${AM_CPPFLAGS} -isystem ${cygwin_headers}"
23 for h in ${newlib_headers}; do
24 AM_CPPFLAGS="${AM_CPPFLAGS} -isystem $h"
29 AC_SUBST(target_builddir)
30 AC_SUBST(winsup_srcdir)