1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 dnl This provides configure definitions used by all the cygwin
16 dnl configure.in files.
18 AC_DEFUN([AC_WINDOWS_HEADERS],[
21 [AS_HELP_STRING([--with-windows-headers=DIR],
22 [specify where the windows includes are located])],
23 [test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])]
27 AC_DEFUN([AC_WINDOWS_LIBS],[
30 [AS_HELP_STRING([--with-windows-libs=DIR],
31 [specify where the windows libraries are located])],
32 [test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])]
34 windows_libdir=$(realdirpath "$with_windows_libs")
35 if test -z "$windows_libdir"; then
36 windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
37 if test -z "$windows_libdir"; then
38 AC_MSG_ERROR([cannot find windows library files])
41 AC_SUBST(windows_libdir)
45 AC_DEFUN([AC_CYGWIN_INCLUDES], [
46 addto_CPPFLAGS -nostdinc
47 : ${ac_cv_prog_CXX:=$CXX}
48 : ${ac_cv_prog_CC:=$CC}
50 cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
51 if test -z "$cygwin_headers"; then
52 AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
55 newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
56 if test -z "$newlib_headers"; then
57 AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
59 newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
61 if test -n "$with_windows_headers"; then
62 if test -e "$with_windows_headers/windef.h"; then
63 windows_headers="$with_windows_headers"
65 AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
67 elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
68 windows_headers="$winsup_srcdir/w32api/include"
70 windows_headers=$(cd $($ac_cv_prog_CC -xc /dev/null -E -include windef.h 2>/dev/null | sed -n 's%^# 1 "\([^"]*\)/windef\.h".*$%\1%p' | head -n1) 2>/dev/null && pwd)
71 if test -z "$windows_headers" -o ! -d "$windows_headers"; then
72 AC_MSG_ERROR([cannot find windows header files])
79 AC_SUBST(windows_headers)
80 AC_SUBST(newlib_headers)
81 AC_SUBST(cygwin_headers)
84 AC_DEFUN([AC_CONFIGURE_ARGS], [
86 for f in $ac_configure_args; do
89 *) configure_args="$configure_args $f" ;;
92 configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
93 AC_SUBST(configure_args)
96 AC_SUBST(target_builddir)
97 AC_SUBST(winsup_srcdir)