~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_have_libz.m4

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl  Copyright (C) 2009 Sun Microsystems
2
 
dnl This file is free software; Sun Microsystems
3
 
dnl gives unlimited permission to copy and/or distribute it,
4
 
dnl with or without modifications, as long as this notice is preserved.
5
 
 
6
 
#--------------------------------------------------------------------
7
 
# Check for libz
8
 
#--------------------------------------------------------------------
9
 
 
10
 
 
11
 
AC_DEFUN([_PANDORA_SEARCH_LIBZ],[
12
 
  AC_REQUIRE([AC_LIB_PREFIX])
13
 
 
14
 
  AC_LIB_HAVE_LINKFLAGS(z,,
15
 
  [
16
 
    #include <zlib.h>
17
 
  ],[
18
 
    crc32(0, Z_NULL, 0);
19
 
  ])
20
 
 
21
 
  AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"])
22
 
])
23
 
 
24
 
AC_DEFUN([_PANDORA_HAVE_LIBZ],[
25
 
 
26
 
  AC_ARG_ENABLE([libz],
27
 
    [AS_HELP_STRING([--disable-libz],
28
 
      [Build with libz support @<:@default=on@:>@])],
29
 
    [ac_enable_libz="$enableval"],
30
 
    [ac_enable_libz="yes"])
31
 
 
32
 
  _PANDORA_SEARCH_LIBZ
33
 
])
34
 
 
35
 
 
36
 
AC_DEFUN([PANDORA_HAVE_LIBZ],[
37
 
  AC_REQUIRE([_PANDORA_HAVE_LIBZ])
38
 
])
39
 
 
40
 
AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[
41
 
  ac_enable_libz="yes"
42
 
  _PANDORA_SEARCH_LIBZ
43
 
 
44
 
  AS_IF([test x$ac_cv_libz = xno],[
45
 
    AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.])
46
 
  ])
47
 
])
48
 
 
49
 
AC_DEFUN([PANDORA_REQUIRE_LIBZ],[
50
 
  AC_REQUIRE([_PANDORA_REQUIRE_LIBZ])
51
 
])