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([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_HEADERS([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 [AS_HELP_STRING([--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.]) ;;
72 *) AC_MSG_ERROR([Invalid target processor "$target_cpu"]) ;;
77 AM_CONDITIONAL(TARGET_X86_64, [test $target_cpu = "x86_64"])
80 [AS_HELP_STRING([--disable-doc], [do not build documentation])],,
82 AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"])
84 AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi])
85 if test -z "$DOCBOOK2XTEXI" ; then
86 if test "x$enable_doc" != "xno"; then
87 AC_MSG_ERROR([docbook2texi is required to build documentation])
90 AM_MISSING_PROG([DOCBOOK2XTEXI], [docbook2texi])
94 AC_CHECK_PROGS([XMLTO], [xmlto])
95 if test -z "$XMLTO"; then
96 if test "x$enable_doc" != "xno"; then
97 AC_MSG_ERROR([xmlto is required to build documentation])
100 AM_MISSING_PROG([XMLTO], [xmlto])
104 if test "x$with_cross_bootstrap" != "xyes"; then
105 AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++)
106 test -n "$MINGW_CXX" || AC_MSG_ERROR([no acceptable MinGW g++ found in \$PATH])
107 AC_CHECK_PROGS(MINGW_CC, ${target_cpu}-w64-mingw32-gcc)
108 test -n "$MINGW_CC" || AC_MSG_ERROR([no acceptable MinGW gcc found in \$PATH])
110 AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"])
114 AC_ARG_ENABLE([dumper],
115 [AS_HELP_STRING([--disable-dumper], [do not build the 'dumper' utility])],
116 [build_dumper=$enableval],
119 AM_CONDITIONAL(BUILD_DUMPER, [test "x$build_dumper" = "xyes"])
121 # libbfd.a doesn't have a pkgconfig file, so we guess what it's dependencies
122 # are, based on what's present in the build environment
123 BFD_LIBS="-lintl -liconv -liberty -lz"
124 AC_CHECK_LIB([sframe], [sframe_decode], [BFD_LIBS="${BFD_LIBS} -lsframe"])
125 AC_CHECK_LIB([zstd], [ZSTD_isError], [BFD_LIBS="${BFD_LIBS} -lzstd"])
136 testsuite/mingw/Makefile