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
|
|
|
|
2022-08-04 22:58:50 +08:00
|
|
|
AM_CPPFLAGS="-U_FORTIFY_SOURCE"
|
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -I${winsup_srcdir}/cygwin/local_includes"
|
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -I${target_builddir}/winsup/cygwin"
|
2021-04-29 17:23:11 +08:00
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -isystem ${cygwin_headers}"
|
2020-10-03 21:41:58 +08:00
|
|
|
for h in ${newlib_headers}; do
|
2021-04-29 17:23:11 +08:00
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -isystem $h"
|
2020-10-03 21:41:58 +08:00
|
|
|
done
|
2021-04-29 17:23:11 +08:00
|
|
|
AC_SUBST(AM_CPPFLAGS)
|
2006-05-25 00:59:03 +08:00
|
|
|
])
|
2012-11-23 21:22:47 +08:00
|
|
|
|
|
|
|
AC_SUBST(target_builddir)
|
|
|
|
AC_SUBST(winsup_srcdir)
|