1 dnl Autoconf configure script for Cygwin.
3 dnl This file is part of Cygwin.
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
9 dnl Process this file with autoconf to produce a configure script.
12 AC_INIT([Cygwin],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
15 AM_INIT_AUTOMAKE([dejagnu foreign no-define no-dist subdir-objects -Wall -Wno-portability -Wno-extra-portability])
16 AM_SILENT_RULES([yes])
19 test -z "$1" && return 1
20 (cd "$1" 2>/dev/null && pwd)
21 if test $? -ne 0; then
28 winsup_srcdir="$(realdirpath $srcdir)"
29 target_builddir="$(realdirpath ..)"
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])
47 AC_CONFIG_HEADER(cygwin/config.h)
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)
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.]) ;;
70 DLL_ENTRY="_dll_entry@12"
71 DEF_DLL_ENTRY="dll_entry@12"
73 TLSOFFSETS_H="tlsoffsets.h"
77 DEF_DLL_ENTRY="dll_entry"
79 TLSOFFSETS_H="tlsoffsets64.h"
81 *) AC_MSG_ERROR([Invalid target processor "$target_cpu"]) ;;
85 AC_SUBST(DEF_DLL_ENTRY)
87 AC_SUBST(TLSOFFSETS_H)
89 AM_CONDITIONAL(TARGET_X86_64, [test $target_cpu = "x86_64"])
91 AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true])
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])
99 AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"])
103 AC_CHECK_LIB([bfd], [bfd_init], [true],
104 AC_MSG_WARN([Not building dumper.exe since some required libraries or headers are missing]))
106 AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
116 testsuite/cygrun/Makefile