1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
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.
9 m4_include([version.ac])[] dnl define libpng_version
10 AC_INIT([libpng (TeX Live)], libpng_version, [tex-k@tug.org])
12 AC_CONFIG_SRCDIR([libpng-src/pngget.c])
13 AC_CONFIG_AUX_DIR([../../build-aux])
14 AC_CONFIG_MACRO_DIR([../../m4])
22 KPSE_COMPILER_VISIBILITY
24 AC_CONFIG_HEADERS([config.h])
26 # Checks for header files.
28 AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
30 # Checks for typedefs, structures, and compiler characteristics.
36 # Checks for library functions.
38 AC_CHECK_FUNCS([memset], , [AC_ERROR([memset not found in libc])])
39 AC_SEARCH_LIBS([pow], [m], , [AC_ERROR([cannot find pow])])
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])])
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])