]> sourceware.org Git - newlib-cygwin.git/blame - winsup/utils/aclocal.m4
* Merge in cygwin-64bit-branch.
[newlib-cygwin.git] / winsup / utils / aclocal.m4
CommitLineData
61522196
CV
1# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2012 Free Software Foundation, Inc.
1fd5e000 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.
1fd5e000 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
14dnl This provides configure definitions used by all the cygwin
15dnl configure.in files.
99fc5e10 16
4c36016b
CF
17AC_DEFUN([AC_WINDOWS_HEADERS],[
18AC_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
26AC_DEFUN([AC_WINDOWS_LIBS],[
27AC_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)
33windows_libdir=$(realdirpath "$with_windows_libs")
34if 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
39fi
40AC_SUBST(windows_libdir)
41]
42)
43
44AC_DEFUN([AC_CYGWIN_INCLUDES], [
45addto_CPPFLAGS -nostdinc
46: ${ac_cv_prog_CXX:=$CXX}
47: ${ac_cv_prog_CC:=$CC}
48
49cygwin_headers=$(realdirpath "$winsup_srcdir/cygwin/include")
50if test -z "$cygwin_headers"; then
51 AC_MSG_ERROR([cannot find $winsup_srcdir/cygwin/include directory])
52fi
99fc5e10 53
4c36016b
CF
54newlib_headers=$(realdirpath $winsup_srcdir/../newlib/libc/include)
55if test -z "$newlib_headers"; then
56 AC_MSG_ERROR([cannot find newlib source directory: $winsup_srcdir/../newlib/libc/include])
57fi
58newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
99fc5e10 59
4c36016b
CF
60if 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
66elif test -d "$winsup_srcdir/w32api/include/windef.h"; then
67 windows_headers="$winsup_srcdir/w32api/include"
99fc5e10 68else
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 73fi
4c36016b
CF
74CC=$ac_cv_prog_CC
75CXX=$ac_cv_prog_CXX
76export CC
77export CXX
78AC_SUBST(windows_headers)
79AC_SUBST(newlib_headers)
80AC_SUBST(cygwin_headers)
99fc5e10
CF
81])
82
4c36016b
CF
83AC_DEFUN([AC_CONFIGURE_ARGS], [
84configure_args=X
85for f in $ac_configure_args; do
86 case "$f" in
87 *--srcdir*) ;;
88 *) configure_args="$configure_args $f" ;;
89 esac
90done
91configure_args=$(/usr/bin/expr "$configure_args" : 'X \(.*\)')
92AC_SUBST(configure_args)
99fc5e10
CF
93])
94
4c36016b
CF
95AC_SUBST(target_builddir)
96AC_SUBST(winsup_srcdir)
1fd5e000 97
This page took 0.263563 seconds and 5 git commands to generate.