]>
Commit | Line | Data |
---|---|---|
61522196 CV |
1 | # generated automatically by aclocal 1.12.1 -*- Autoconf -*- |
2 | ||
3 | # Copyright (C) 1996-2012 Free Software Foundation, Inc. | |
99fc5e10 | 4 | |
4c36016b CF |
5 | # This file is free software; the Free Software Foundation |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
99fc5e10 | 8 | |
4c36016b CF |
9 | # This program is distributed in the hope that it will be useful, |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
99fc5e10 | 13 | |
4c36016b CF |
14 | dnl This provides configure definitions used by all the cygwin |
15 | dnl configure.in files. | |
99fc5e10 | 16 | |
4c36016b CF |
17 | AC_DEFUN([AC_WINDOWS_HEADERS],[ |
18 | AC_ARG_WITH( | |
19 | [windows-headers], | |
20 | [AS_HELP_STRING([--with-windows-headers=DIR], | |
21 | [specify where the windows includes are located])], | |
22 | [test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-headers])] | |
23 | ) | |
99fc5e10 CF |
24 | ]) |
25 | ||
4c36016b CF |
26 | AC_DEFUN([AC_WINDOWS_LIBS],[ |
27 | AC_ARG_WITH( | |
28 | [windows-libs], | |
29 | [AS_HELP_STRING([--with-windows-libs=DIR], | |
30 | [specify where the windows libraries are located])], | |
31 | [test -z "$withval" && AC_MSG_ERROR([must specify value for --with-windows-libs])] | |
32 | ) | |
33 | windows_libdir=$(realdirpath "$with_windows_libs") | |
34 | if test -z "$windows_libdir"; then | |
35 | 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')) | |
36 | if test -z "$windows_libdir"; then | |
37 | AC_MSG_ERROR([cannot find windows library files]) | |
38 | fi | |
39 | fi | |
40 | AC_SUBST(windows_libdir) | |
41 | ] | |
42 | ) | |
43 | ||
44 | AC_DEFUN([AC_CYGWIN_INCLUDES], [ | |
45 | addto_CPPFLAGS -nostdinc | |
46 | : ${ac_cv_prog_CXX:=$CXX} | |
47 | : ${ac_cv_prog_CC:=$CC} | |
48 | ||
49 | cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include") | |
50 | if test -z "$cygwin_headers"; then | |
51 | AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory]) | |
52 | fi | |
99fc5e10 | 53 | |
4c36016b CF |
54 | newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include) |
55 | if test -z "$newlib_headers"; then | |
56 | AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include]) | |
57 | fi | |
58 | newlib_headers="$target_builddir/newlib/targ-include $newlib_headers" | |
99fc5e10 | 59 | |
4c36016b CF |
60 | if test -n "$with_windows_headers"; then |
61 | if test -e "$with_windows_headers/windef.h"; then | |
62 | windows_headers="$with_windows_headers" | |
99fc5e10 | 63 | else |
4c36016b | 64 | AC_MSG_ERROR([cannot find windef.h in specified --with-windows-headers path: $saw_windows_headers]); |
99fc5e10 | 65 | fi |
4c36016b CF |
66 | elif test -d "$winsup_srcdir/w32api/include/windef.h"; then |
67 | windows_headers="$winsup_srcdir/w32api/include" | |
99fc5e10 | 68 | else |
4c36016b CF |
69 | 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) |
70 | if test -z "$windows_headers" -o ! -d "$windows_headers"; then | |
71 | AC_MSG_ERROR([cannot find windows header files]) | |
99fc5e10 | 72 | fi |
99fc5e10 | 73 | fi |
4c36016b CF |
74 | CC=$ac_cv_prog_CC |
75 | CXX=$ac_cv_prog_CXX | |
76 | export CC | |
77 | export CXX | |
78 | AC_SUBST(windows_headers) | |
79 | AC_SUBST(newlib_headers) | |
80 | AC_SUBST(cygwin_headers) | |
99fc5e10 CF |
81 | ]) |
82 | ||
4c36016b CF |
83 | AC_DEFUN([AC_CONFIGURE_ARGS], [ |
84 | configure_args=X | |
85 | for f in $ac_configure_args; do | |
86 | case "$f" in | |
87 | *--srcdir*) ;; | |
88 | *) configure_args="$configure_args $f" ;; | |
89 | esac | |
90 | done | |
91 | configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)') | |
92 | AC_SUBST(configure_args) | |
99fc5e10 CF |
93 | ]) |
94 | ||
4c36016b CF |
95 | AC_SUBST(target_builddir) |
96 | AC_SUBST(winsup_srcdir) | |
99fc5e10 | 97 |