summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/configure.ac
blob: 5756450c0b60811c448c98d189df5dfacd8d4f00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
dnl Process this file with autoconf to produce a configure script.
dnl
dnl   Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
dnl
dnl   This file is free software; the copyright holder
dnl   gives unlimited permission to copy and/or distribute it,
dnl   with or without modifications, as long as this notice is preserved.
dnl
m4_define([libpng_major], [1])[]dnl
m4_define([libpng_minor], [2])[]dnl
m4_define([libpng_micro], [40])[]dnl using unmodified libpng source tree
m4_define([libpng_version], libpng_major.libpng_minor.libpng_micro)[]dnl
AC_INIT([libpng for TeX Live], libpng_version, [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([libpng-]libpng_version)
AC_CONFIG_AUX_DIR([../../build-aux])
AC_CONFIG_MACRO_DIR([../../m4])

AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE

PNGLIB_MAJOR=libpng_major()
PNGLIB_MINOR=libpng_minor()
PNGLIB_RELEASE=libpng_micro()
AC_SUBST([PNGLIB_MAJOR])
AC_SUBST([PNGLIB_MINOR])
AC_SUBST([PNGLIB_RELEASE])

AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_LN_S

KPSE_COMPILER_WARNINGS

AC_CONFIG_HEADERS([config.h])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_STRTOD
AC_CHECK_FUNCS([memset], , [AC_ERROR([memset not found in libc])])
AC_SEARCH_LIBS([pow], [m], , [AC_ERROR([cannot find pow])])

KPSE_ZLIB_FLAGS

AM_CONDITIONAL([build], [test "x$enable_build" != xno])

if test "x$enable_build" != xno || test -f config.force; then

KPSE_ADD_FLAGS([zlib])
AC_CHECK_FUNC([zlibVersion], , [AC_ERROR([zlib not found])])
KPSE_RESTORE_FLAGS

echo timestamp >config.force
fi

LIBPNG_TREE=libpng-[]libpng_version
AC_SUBST([LIBPNG_TREE])

LIBPNG_DEFINES='-DPNG_CONFIGURE_LIBPNG -DPNG_NO_MMX_CODE'
AC_SUBST([LIBPNG_DEFINES])

AC_CONFIG_FILES([Makefile include/Makefile])

AC_OUTPUT