]> sourceware.org Git - newlib-cygwin.git/blob - winsup/configure.ac
Cygwin: POSIX msg queues: implement open/mq_open entirely in fhandler
[newlib-cygwin.git] / winsup / configure.ac
1 dnl Autoconf configure script for Cygwin.
2 dnl
3 dnl This file is part of Cygwin.
4 dnl
5 dnl This software is a copyrighted work licensed under the terms of the
6 dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 dnl details.
8 dnl
9 dnl Process this file with autoconf to produce a configure script.
10
11 AC_PREREQ([2.59])
12 AC_INIT([Cygwin],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
13 AC_CONFIG_AUX_DIR(..)
14 AC_CANONICAL_TARGET
15 AM_INIT_AUTOMAKE([dejagnu foreign no-define no-dist subdir-objects -Wall -Wno-portability -Wno-extra-portability])
16 AM_SILENT_RULES([yes])
17
18 realdirpath() {
19 test -z "$1" && return 1
20 (cd "$1" 2>/dev/null && pwd)
21 if test $? -ne 0; then
22 return 1
23 else
24 return 0
25 fi
26 }
27
28 winsup_srcdir="$(realdirpath $srcdir)"
29 target_builddir="$(realdirpath ..)"
30
31 AC_NO_EXECUTABLES
32
33 AC_PROG_INSTALL
34 AC_PROG_MKDIR_P
35 AC_PROG_CC
36 AC_PROG_CXX
37 AC_PROG_CPP
38 AM_PROG_AS
39
40 AC_LANG(C)
41 AC_LANG(C++)
42
43 AC_ARG_WITH([cross-bootstrap],[AS_HELP_STRING([--with-cross-bootstrap],[do not build programs using the MinGW toolchain or check for MinGW libraries (useful for bootstrapping a cross-compiler)])],[],[with_cross_bootstrap=no])
44
45 AC_CYGWIN_INCLUDES
46
47 AC_CONFIG_HEADER(cygwin/config.h)
48
49 AC_CHECK_TOOL(AR, ar, ar)
50 AC_CHECK_TOOL(AS, as, as)
51 AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
52 AC_CHECK_TOOL(LD, ld, ld)
53 AC_CHECK_TOOL(NM, nm, nm)
54 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
55 AC_CHECK_TOOL(OBJDUMP, objdump, objdump)
56 AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
57 AC_CHECK_TOOL(STRIP, strip, strip)
58 AC_CHECK_TOOL(WINDRES, windres, windres)
59
60 AC_ARG_ENABLE(debugging,
61 [ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging],
62 [case "${enableval}" in
63 yes) AC_DEFINE([DEBUGGING],[1],[Define if DEBUGGING support is requested.]) ;;
64 no) ;;
65 esac
66 ])
67
68 case "$target_cpu" in
69 i?86)
70 DLL_ENTRY="_dll_entry@12"
71 DEF_DLL_ENTRY="dll_entry@12"
72 DIN_FILE="i686.din"
73 TLSOFFSETS_H="tlsoffsets.h"
74 ;;
75 x86_64)
76 DLL_ENTRY="dll_entry"
77 DEF_DLL_ENTRY="dll_entry"
78 DIN_FILE="x86_64.din"
79 TLSOFFSETS_H="tlsoffsets64.h"
80 ;;
81 *) AC_MSG_ERROR([Invalid target processor "$target_cpu"]) ;;
82 esac
83
84 AC_SUBST(DLL_ENTRY)
85 AC_SUBST(DEF_DLL_ENTRY)
86 AC_SUBST(DIN_FILE)
87 AC_SUBST(TLSOFFSETS_H)
88
89 AM_CONDITIONAL(TARGET_X86_64, [test $target_cpu = "x86_64"])
90
91 AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true])
92
93 if test "x$with_cross_bootstrap" != "xyes"; then
94 AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++)
95 test -n "$MINGW_CXX" || AC_MSG_ERROR([no acceptable MinGW g++ found in \$PATH])
96 AC_CHECK_PROGS(MINGW_CC, ${target_cpu}-w64-mingw32-gcc)
97 test -n "$MINGW_CC" || AC_MSG_ERROR([no acceptable MinGW gcc found in \$PATH])
98 fi
99 AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"])
100
101 AC_EXEEXT
102
103 AC_CHECK_LIB([bfd], [bfd_init], [true],
104 AC_MSG_WARN([Not building dumper.exe since some required libraries or headers are missing]))
105
106 AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
107
108 AC_CONFIG_FILES([
109 Makefile
110 cygwin/Makefile
111 cygserver/Makefile
112 doc/Makefile
113 utils/Makefile
114 utils/mingw/Makefile
115 testsuite/Makefile
116 testsuite/cygrun/Makefile
117 ])
118
119 AC_OUTPUT
This page took 0.040964 seconds and 5 git commands to generate.