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