]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/configure.ac
fc7697b3bae30db41e4cb2e55a2680cbf29806ac
[newlib-cygwin.git] / winsup / cygwin / configure.ac
1 dnl Autoconf configure script for Cygwin.
2 dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 dnl 2006, 2008, 2009, 2011, 2012, 2013, 2014 Red Hat, Inc.
4 dnl
5 dnl This file is part of Cygwin.
6 dnl
7 dnl This software is a copyrighted work licensed under the terms of the
8 dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
9 dnl details.
10 dnl
11 dnl Process this file with autoconf to produce a configure script.
12
13 AC_PREREQ(2.59)dnl
14 AC_INIT([Cygwin DLL], 0,
15 cygwin@cygwin.com, cygwin, https://cygwin.com)
16 AC_CONFIG_SRCDIR(Makefile.in)
17 AC_CONFIG_HEADER(config.h)
18 AC_CONFIG_AUX_DIR(..)
19
20 . ${srcdir}/../configure.cygwin
21
22 AC_PROG_INSTALL
23 AC_NO_EXECUTABLES
24 AC_CANONICAL_SYSTEM
25
26 AC_PROG_CC
27 AC_PROG_CXX
28 AC_PROG_CPP
29 AC_LANG(C)
30
31 AC_WINDOWS_HEADERS
32 AC_WINDOWS_LIBS
33
34 AC_LANG(C++)
35
36 AC_CYGWIN_INCLUDES
37
38 case "$with_cross_host" in
39 ""|*cygwin*)
40 all_host="all_host"
41 install_host="install_host"
42 ;;
43 *)
44 all_host=
45 install_host=
46 ;;
47 esac
48
49 AC_SUBST(all_host)
50 AC_SUBST(install_host)
51
52 AC_CHECK_TOOL(AR, ar, ar)
53 AC_CHECK_TOOL(AS, as, as)
54 AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
55 AC_CHECK_TOOL(LD, ld, ld)
56 AC_CHECK_TOOL(NM, nm, nm)
57 AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
58 AC_CHECK_TOOL(OBJDUMP, objdump, objdump)
59 AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
60 AC_CHECK_TOOL(STRIP, strip, strip)
61 AC_CHECK_TOOL(WINDRES, windres, windres)
62
63 AC_PROG_MAKE_SET
64
65 AC_ARG_ENABLE(debugging,
66 [ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging],
67 [case "${enableval}" in
68 yes) AC_DEFINE(DEBUGGING) ;;
69 no) ;;
70 esac
71 ])
72
73 dnl The only time we might want to transform the install names
74 dnl is for unix x cygwin. Otherwise we don't. For now we don't
75 dnl transform names.
76
77 dnl if test "x$cross_compiling" = "xno" -a ; then
78 dnl if test "x$program_transform_name" = "xs,x,x,"; then
79 dnl program_transform_name=""
80 dnl fi
81 dnl if test "x$program_transform_name" = "x"; then
82 dnl program_transform_name="s,^,$target_alias-,"
83 dnl else
84 dnl program_transform_name="$program_transform_name -e s,^,$target_alias-,"
85 dnl fi
86 dnl fi
87
88 case "$target_cpu" in
89 i?86)
90 DLL_NAME="cygwin1.dll"
91 DLL_ENTRY="_dll_entry@12"
92 DEF_DLL_ENTRY="dll_entry@12"
93 DIN_FILE="i686.din"
94 TLSOFFSETS_H="tlsoffsets.h"
95 ;;
96 x86_64)
97 DLL_NAME="cygwin1.dll"
98 DLL_ENTRY="dll_entry"
99 DEF_DLL_ENTRY="dll_entry"
100 DIN_FILE="x86_64.din"
101 TLSOFFSETS_H="tlsoffsets64.h"
102 ;;
103 *) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
104 esac
105
106 AC_CONFIGURE_ARGS
107 AC_SUBST(LIBSERVER)
108 AC_SUBST(DLL_NAME)
109 AC_SUBST(DLL_ENTRY)
110 AC_SUBST(DEF_DLL_ENTRY)
111 AC_SUBST(DIN_FILE)
112 AC_SUBST(TLSOFFSETS_H)
113 AC_OUTPUT(Makefile)
This page took 0.039927 seconds and 4 git commands to generate.