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