]>
Commit | Line | Data |
---|---|---|
c57452c8 CF |
1 | dnl Autoconf configure script for Cygwin. |
2 | dnl Copyright 2003 Red Hat, Inc. | |
3 | dnl | |
4 | dnl This file is part of Cygwin. | |
5 | dnl | |
6 | dnl This software is a copyrighted work licensed under the terms of the | |
7 | dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for | |
8 | dnl details. | |
9 | dnl | |
10 | dnl Process this file with autoconf to produce a configure script. | |
11 | ||
99fc5e10 | 12 | AC_PREREQ(2.59)dnl |
c57452c8 CF |
13 | AC_INIT(cygserver.cc) |
14 | ||
99fc5e10 CF |
15 | AC_CONFIG_AUX_DIR(../..) |
16 | ||
ddb67621 | 17 | INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c` |
7f4773b3 | 18 | |
c57452c8 | 19 | AC_PROG_INSTALL |
c57452c8 CF |
20 | AC_CANONICAL_SYSTEM |
21 | ||
22 | LIB_AC_PROG_CC | |
23 | LIB_AC_PROG_CXX | |
24 | ||
25 | case "$with_cross_host" in | |
26 | ""|*cygwin*) | |
27 | all_host="all_host" | |
28 | install_host="install_host" | |
29 | ;; | |
30 | *) | |
31 | all_host= | |
32 | install_host= | |
33 | ;; | |
34 | esac | |
35 | ||
36 | AC_SUBST(all_host) | |
37 | AC_SUBST(install_host) | |
38 | ||
39 | AC_CHECK_TOOL(AR, ar, ar) | |
40 | AC_CHECK_TOOL(AS, as, as) | |
41 | AC_CHECK_TOOL(RANLIB, ranlib, ranlib) | |
42 | AC_CHECK_TOOL(LD, ld, ld) | |
43 | AC_CHECK_TOOL(NM, nm, nm) | |
44 | AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool) | |
45 | AC_CHECK_TOOL(WINDRES, windres, windres) | |
46 | ||
47 | AC_ALLOCA | |
48 | AC_PROG_MAKE_SET | |
49 | ||
50 | dnl check whether gcc supports __builtin_memset. | |
51 | # Test for builtin mem* functions. | |
52 | AC_LANG_SAVE | |
53 | AC_LANG_CPLUSPLUS | |
54 | AC_TRY_COMPILE([ | |
55 | #include <string.h> | |
56 | void foo(char *s, int c, size_t n) | |
57 | { | |
58 | __builtin_memset(s, c, n); | |
59 | } | |
60 | ], [ ], | |
61 | use_builtin_memset=yes, use_builtin_memset=no) | |
62 | if test $use_builtin_memset = "yes"; then | |
63 | AC_DEFINE(HAVE_BUILTIN_MEMSET) | |
64 | fi | |
65 | AC_LANG_RESTORE | |
66 | ||
67 | AC_ARG_ENABLE(debugging, | |
68 | [ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging], | |
69 | [case "${enableval}" in | |
70 | yes) AC_DEFINE(DEBUGGING) ;; | |
71 | no) ;; | |
72 | esac | |
73 | ]) | |
74 | ||
75 | AC_OUTPUT(Makefile) |