diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 08:07:15 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 08:07:15 +0000 |
commit | b89093a4be8467433b6dbabfa09b57e213a53fe0 (patch) | |
tree | 6f4fb6eecce8905febf68c34d5926699790466e1 /Build/source/libs/libpng/configure.ac | |
parent | 10d837d22d7d99b26f44847f92501f6037da4ec2 (diff) |
new build system
git-svn-id: svn://tug.org/texlive/trunk@12451 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/configure.ac')
-rw-r--r-- | Build/source/libs/libpng/configure.ac | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/Build/source/libs/libpng/configure.ac b/Build/source/libs/libpng/configure.ac new file mode 100644 index 00000000000..62fa5f666bc --- /dev/null +++ b/Build/source/libs/libpng/configure.ac @@ -0,0 +1,80 @@ +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], [34])[]dnl using unmodified libpng-1.2.34 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.63]) +AC_CONFIG_SRCDIR([libpng-]libpng_version[/pngget.c]) +AC_CONFIG_AUX_DIR([../../build-aux]) +AC_CONFIG_MACRO_DIR([../../m4]) + +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +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_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]) + +# Configure must not fail, or 'make dist' will fail as well; thus +# don't run any tests for '--disable-build', there may be no zlib. +if test "x$enable_build" != xno; then + +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS + +CPPFLAGS="$CPPFLAGS $ZLIB_INCLUDES" +LIBS="$ZLIB_LIBS $LIBS" + +AC_CHECK_FUNC([zlibVersion], , [AC_ERROR([zlib not found])]) + +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS + +fi + +LIBPNG_TREE=libpng-[]libpng_version +AC_SUBST([LIBPNG_TREE]) + +LIBPNG_DEFINES='-DPNG_CONFIGURE_LIBPNG -DPNG_NO_MMX_CODE' +AC_SUBST([LIBPNG_DEFINES]) + +dnl Use $LIBPNG_TREE to exclude $LIBPNG_TREE/png.h from DIST_COMMON +AC_CONFIG_LINKS([png.h:$LIBPNG_TREE/png.h pngconf.h:$LIBPNG_TREE/pngconf.h]) + +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT |