]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygserver/aclocal.m4
* bsd_helper.h: Throughout, convert "struct thread" to "class thread".
[newlib-cygwin.git] / winsup / cygserver / aclocal.m4
1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5 # Inc.
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.
9
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
13 # PARTICULAR PURPOSE.
14
15 dnl This provides configure definitions used by all the cygwin
16 dnl configure.in files.
17
18 AC_DEFUN([AC_WINDOWS_HEADERS],[
19 AC_ARG_WITH(
20 [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])]
24 )
25 ])
26
27 AC_DEFUN([AC_WINDOWS_LIBS],[
28 AC_ARG_WITH(
29 [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])]
33 )
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])
39 fi
40 fi
41 AC_SUBST(windows_libdir)
42 ]
43 )
44
45 AC_DEFUN([AC_CYGWIN_INCLUDES], [
46 addto_CPPFLAGS -nostdinc
47 : ${ac_cv_prog_CXX:=$CXX}
48 : ${ac_cv_prog_CC:=$CC}
49
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])
53 fi
54
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])
58 fi
59 newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
60
61 if test -n "$with_windows_headers"; then
62 if test -e "$with_windows_headers/windef.h"; then
63 windows_headers="$with_windows_headers"
64 else
65 AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]);
66 fi
67 elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
68 windows_headers="$winsup_srcdir/w32api/include"
69 else
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])
73 fi
74 fi
75 CC=$ac_cv_prog_CC
76 CXX=$ac_cv_prog_CXX
77 export CC
78 export CXX
79 AC_SUBST(windows_headers)
80 AC_SUBST(newlib_headers)
81 AC_SUBST(cygwin_headers)
82 ])
83
84 AC_DEFUN([AC_CONFIGURE_ARGS], [
85 configure_args=X
86 for f in $ac_configure_args; do
87 case "$f" in
88 *--srcdir*) ;;
89 *) configure_args="$configure_args $f" ;;
90 esac
91 done
92 configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
93 AC_SUBST(configure_args)
94 ])
95
96 AC_SUBST(target_builddir)
97 AC_SUBST(winsup_srcdir)
98
This page took 0.041325 seconds and 5 git commands to generate.