]> cygwin.com Git - cygwin-apps/setup.git/blame - zlib/configure.in
2002-04-26 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / zlib / configure.in
CommitLineData
739457f4
CF
1dnl Process this with autoconf to create configure
2
26fe6c30
RC
3AC_INIT
4AC_CONFIG_SRCDIR([zlib.h])
5AC_PREREQ(2.53)
6AC_CONFIG_AUX_DIR(../cfgaux)
7AC_CANONICAL_TARGET([])
739457f4
CF
8AM_INIT_AUTOMAKE(zlib, 1.1.3)
9
10AM_MAINTAINER_MODE
11
12dnl We use these options to decide which functions to include.
13AC_ARG_WITH(target-subdir,
14[ --with-target-subdir=SUBDIR
15 configuring in a subdirectory])
16AC_ARG_WITH(cross-host,
17[ --with-cross-host=HOST configuring with a cross compiler])
18
19AC_ARG_WITH(system-zlib,
20[ --with-system-zlib use installed libz])
21
26fe6c30 22dnl LIB_AC_PROG_CC
739457f4 23
302f1b6d
RC
24AC_PROG_CC
25
739457f4
CF
26if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
27 COMPPATH=.
28else
29 COMPPATH=..
30fi
31AC_SUBST(COMPPATH)
32
33if test -n "$with_cross_host"; then
34 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
35 # may not work correctly, because the compiler may not be able to
36 # link executables.
37
38 # We assume newlib. This lets us hard-code the functions we know
39 # we'll have.
40 AC_DEFINE(HAVE_MEMCPY)
41 AC_DEFINE(HAVE_STRERROR)
42
43 # We ignore --with-system-zlib in this case.
44 target_all=libzcygw.a
45else
46 AC_FUNC_MMAP
47 AC_CHECK_FUNCS(memcpy strerror)
48
49 if test "$with_system_zlib" = yes; then
50 AC_CHECK_LIB(z, deflate, target_all=, target_all=libzcygw.a)
51 else
52 target_all=libzcygw.a
53 fi
54fi
55
56AC_SUBST(target_all)
57
58AC_CHECK_HEADERS(unistd.h)
59
60AC_CHECK_TOOL(AR, ar, ar)
61AC_SUBST(AR)
62AC_CHECK_TOOL(AS, as, as)
63AC_SUBST(AS)
64AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
65AC_SUBST(RANLIB)
66AC_CHECK_TOOL(LD, ld, ld)
67AC_SUBST(LD)
fb087b80
CF
68AC_CHECK_TOOL(NM, nm, nm)
69AC_SUBST(NM)
739457f4
CF
70AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
71AC_SUBST(DLLTOOL)
72AC_CHECK_TOOL(WINDRES, windres, windres)
73AC_SUBST(WINDRES)
74
75AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
76
26fe6c30
RC
77AC_CONFIG_FILES([Makefile])
78AC_OUTPUT
This page took 0.601052 seconds and 5 git commands to generate.