Browse CVS Repository
Contents of /xoonips/AL/macros/zlib.m4
Parent Directory
| Revision Log
| Revision Graph
Revision 1.3 -
( show annotations)
( download)
Sat Dec 10 11:55:02 2005 UTC
(18 years, 4 months ago)
by orrisroot
Branch: MAIN
CVS Tags: AL_PORTING, REL20051226, REL20060323, tag20060615, tag20070307current, tag20061115, tag20061130, merge_to_20060605, tag20070307, REL20060213, RELENG_2_0_0a_RELEASE, tag20060622, merge_to_20060411, HEAD
Branch point for: XOONIPS_STABLE_32, XOONIPS_STABLE_3, XOONIPS_STABLE_2
Changes since 1.2: +3 -1 lines
- updated autotools versions.
autoconf -> 2.59
automake -> 1.9.6
libtool -> 1.5.20
- fixed help messages and indents for './configure --help'.
- fixed extra files list for 'make dist'
- added COPYING file
| 1 |
dnl |
| 2 |
dnl zlib.m4 -- Find the path to the zlib library. |
| 3 |
dnl |
| 4 |
AC_DEFUN([AM_PATH_ZLIB], |
| 5 |
[ZLIB_CFLAGS="" |
| 6 |
ZLIB_LDFLAGS="" |
| 7 |
ZLIB_LIBS="" |
| 8 |
|
| 9 |
AC_ARG_WITH([zlib-prefix], |
| 10 |
[ --with-zlib-prefix=PFX Prefix where zlib is installed (optional)], |
| 11 |
zlib_prefix="$withval", zlib_prefix="") |
| 12 |
if test x"$zlib_prefix" = xyes ; then |
| 13 |
zlib_prefix=""; |
| 14 |
fi |
| 15 |
|
| 16 |
AC_MSG_CHECKING([for zlib location]) |
| 17 |
if test x"$zlib_prefix" = x ; then |
| 18 |
zlib_header_found="no" |
| 19 |
for dir in /usr/local /usr ; do |
| 20 |
if test -f "$dir/include/zlib.h" ; then |
| 21 |
zlib_header_found="yes" |
| 22 |
ZLIB_CFLAGS="-I$dir/include" |
| 23 |
ZLIB_LDFLAGS="-L$dir/lib" |
| 24 |
break |
| 25 |
fi |
| 26 |
done |
| 27 |
if test x"$zlib_header_found" = "no" ; then |
| 28 |
AC_MSG_RESULT([no]) |
| 29 |
AC_MSG_ERROR([zlib header file 'zlib.h' not found.]) |
| 30 |
fi |
| 31 |
AC_MSG_RESULT([$dir]) |
| 32 |
else |
| 33 |
ZLIB_CFLAGS="-I$zlib_prefix/include" |
| 34 |
ZLIB_LDFLAGS="-L$zlib_prefix/lib" |
| 35 |
AC_MSG_RESULT([$zlib_prefix]) |
| 36 |
fi |
| 37 |
|
| 38 |
zlib_save_LDFLAGS=$LDFLAGS |
| 39 |
LDFLAGS="$ZLIB_LDFLAGS $LDFLAGS" |
| 40 |
zlib_save_CFLAGS=$CFLAGS |
| 41 |
CFLAGS="$ZLIB_CFLAGS $CFLAGS" |
| 42 |
AC_CHECK_LIB([z], [compress], [ZLIB_LIBS="$ZLIB_LDFLAGS -lz"], [ZLIB_LIBS=""]) |
| 43 |
LDFLAGS=$zlib_save_LDFLAGS |
| 44 |
CFLAGS=$zlib_save_CFLAGS |
| 45 |
if test x"$ZLIB_LIBS" = x ; then |
| 46 |
AC_MSG_ERROR([zlib required but not found]) |
| 47 |
fi |
| 48 |
|
| 49 |
AC_SUBST([ZLIB_CFLAGS]) |
| 50 |
AC_SUBST([ZLIB_LIBS])]) |
| 51 |
] |
| |