beta-0.89.2
[luatex.git] / source / libs / libpng / configure.ac
blobdfefa551145f0823c6737c3e09cb291b718cce8b
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl   Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
4 dnl
5 dnl   This file is free software; the copyright holder
6 dnl   gives unlimited permission to copy and/or distribute it,
7 dnl   with or without modifications, as long as this notice is preserved.
8 dnl
9 m4_include([version.ac])[] dnl define libpng_version
10 AC_INIT([libpng (TeX Live)], libpng_version, [tex-k@tug.org])
11 AC_PREREQ([2.65])
12 AC_CONFIG_SRCDIR([libpng-src/pngget.c])
13 AC_CONFIG_AUX_DIR([../../build-aux])
14 AC_CONFIG_MACRO_DIR([../../m4])
16 KPSE_BASIC([libpng])
18 AC_PROG_CC
19 AC_PROG_RANLIB
20 AC_PROG_LN_S
22 KPSE_COMPILER_VISIBILITY
24 AC_CONFIG_HEADERS([config.h])
26 # Checks for header files.
27 AC_HEADER_STDC
28 AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
30 # Checks for typedefs, structures, and compiler characteristics.
31 AC_C_CONST
32 AC_TYPE_SIZE_T
33 AC_STRUCT_TM
34 AC_C_RESTRICT
36 # Checks for library functions.
37 AC_FUNC_STRTOD
38 AC_CHECK_FUNCS([memset], , [AC_ERROR([memset not found in libc])])
39 AC_SEARCH_LIBS([pow], [m], , [AC_ERROR([cannot find pow])])
41 KPSE_ZLIB_FLAGS
43 AM_CONDITIONAL([build], [test "x$enable_build" != xno])
45 if test "x$enable_build" != xno || test -f config.force; then
47 KPSE_ADD_FLAGS([zlib])
48 AC_CHECK_FUNC([zlibVersion], , [AC_ERROR([zlib not found])])
49 KPSE_RESTORE_FLAGS
51 echo timestamp >config.force
54 AC_SUBST([LIBPNG_TREE], [libpng-src])
56 AC_SUBST([LIBPNG_DEFINES], ['-DPNG_CONFIGURE_LIBPNG -DPNG_NO_MMX_CODE'])
58 AC_CONFIG_FILES([Makefile include/Makefile])
60 AC_OUTPUT