2006-03-02 13:23:18 +00:00
|
|
|
# configure.ac
|
|
|
|
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
dnl Minor upgrades (compatible ABI): increment the package version
|
2006-12-25 19:31:13 +00:00
|
|
|
dnl (third field in two places below) and set the PNGLIB_RELEASE
|
2006-03-02 13:23:18 +00:00
|
|
|
dnl variable.
|
|
|
|
dnl
|
|
|
|
dnl Major upgrades (incompatible ABI): increment the package major
|
|
|
|
dnl version (second field, or first if desired), set the minor
|
|
|
|
dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in
|
|
|
|
dnl Makefile.am to upgrade the package name.
|
|
|
|
|
|
|
|
dnl This is here to prevent earlier autoconf from being used, it
|
|
|
|
dnl should not be necessary to regenerate configure if the time
|
|
|
|
dnl stamps are correct
|
|
|
|
AC_PREREQ(2.59)
|
|
|
|
|
|
|
|
dnl Version number stuff here:
|
|
|
|
|
2007-07-15 03:48:22 +00:00
|
|
|
AC_INIT([libpng], [1.2.19beta25], [png-mng-implement@lists.sourceforge.net])
|
2006-03-02 13:23:18 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
dnl stop configure from automagically running automake
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2007-07-15 03:48:22 +00:00
|
|
|
PNGLIB_VERSION=1.2.19beta25
|
2006-12-14 02:54:57 +00:00
|
|
|
PNGLIB_MAJOR=1
|
|
|
|
PNGLIB_MINOR=2
|
2007-05-18 18:40:59 +00:00
|
|
|
PNGLIB_RELEASE=19
|
2006-03-02 13:23:18 +00:00
|
|
|
|
|
|
|
dnl End of version number stuff
|
|
|
|
|
2004-12-03 00:14:51 +00:00
|
|
|
AC_CONFIG_SRCDIR([pngget.c])
|
2006-06-13 13:00:09 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2004-12-03 00:14:51 +00:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
2006-03-04 22:50:47 +00:00
|
|
|
AC_PROG_LD
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_CHECK_TOOL(SED, sed, :)
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
2004-12-03 00:14:51 +00:00
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_STRTOD
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
2006-03-07 13:09:22 +00:00
|
|
|
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
|
|
|
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
|
2006-03-04 22:50:47 +00:00
|
|
|
|
2006-12-03 03:09:29 +00:00
|
|
|
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
2006-12-18 20:08:10 +00:00
|
|
|
AC_MSG_CHECKING(
|
|
|
|
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
|
2006-04-17 00:45:31 +00:00
|
|
|
AC_TRY_COMPILE(
|
2007-06-19 01:53:52 +00:00
|
|
|
[#include "$srcdir/pnggccrd.c"],
|
2006-04-17 19:33:23 +00:00
|
|
|
[return 0;],
|
2006-12-03 03:09:29 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2006-12-07 04:06:25 +00:00
|
|
|
LIBPNG_NO_MMX="",
|
2006-12-03 03:09:29 +00:00
|
|
|
AC_MSG_RESULT(no)
|
2006-12-07 04:06:25 +00:00
|
|
|
LIBPNG_NO_MMX=-DPNG_NO_MMX_CODE)
|
|
|
|
LIBPNG_DEFINES=$LIBPNG_DEFINES\ $LIBPNG_NO_MMX
|
2006-04-17 19:33:23 +00:00
|
|
|
AC_SUBST(LIBPNG_DEFINES)
|
2006-12-07 04:06:25 +00:00
|
|
|
AC_SUBST(LIBPNG_NO_MMX)
|
2006-04-17 00:45:31 +00:00
|
|
|
|
2006-03-04 22:50:47 +00:00
|
|
|
AC_MSG_CHECKING([if libraries can be versioned])
|
|
|
|
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
|
|
|
|
if test "$GLD"; then
|
|
|
|
have_ld_version_script=yes
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
have_ld_version_script=no
|
|
|
|
AC_MSG_RESULT(no)
|
2006-04-19 18:15:20 +00:00
|
|
|
AC_MSG_WARN(*** You have not enabled versioned symbols.)
|
2006-03-04 22:50:47 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
2006-03-02 13:23:18 +00:00
|
|
|
|
|
|
|
# Substitutions for .in files
|
|
|
|
AC_SUBST(PNGLIB_VERSION)
|
|
|
|
AC_SUBST(PNGLIB_MAJOR)
|
|
|
|
AC_SUBST(PNGLIB_MINOR)
|
2006-12-25 19:31:13 +00:00
|
|
|
AC_SUBST(PNGLIB_RELEASE)
|
2006-03-02 13:23:18 +00:00
|
|
|
|
|
|
|
# Additional arguments (and substitutions)
|
|
|
|
# Allow the pkg-config directory to be set
|
|
|
|
AC_ARG_WITH(pkgconfigdir,
|
|
|
|
AC_HELP_STRING([--with-pkgconfigdir],
|
2006-04-17 00:45:31 +00:00
|
|
|
[Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
|
2006-03-02 13:23:18 +00:00
|
|
|
[pkgconfigdir=${withval}],
|
|
|
|
[pkgconfigdir='${libdir}/pkgconfig'])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_SUBST([pkgconfigdir])
|
|
|
|
AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
2006-03-02 13:23:18 +00:00
|
|
|
# Make the *-config binary config scripts optional
|
|
|
|
AC_ARG_WITH(binconfigs,
|
|
|
|
AC_HELP_STRING([--with-binconfigs],
|
|
|
|
[Generate shell libpng-config scripts as well as pkg-config data]
|
|
|
|
[@<:@default=yes@:>@]),
|
|
|
|
[if test "${withval}" = no; then
|
|
|
|
binconfigs=
|
|
|
|
AC_MSG_NOTICE([libpng-config scripts will not be built])
|
|
|
|
else
|
|
|
|
binconfigs='${binconfigs}'
|
|
|
|
fi],
|
|
|
|
[binconfigs='${binconfigs}'])
|
|
|
|
AC_SUBST([binconfigs])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
2006-03-02 13:23:18 +00:00
|
|
|
# Allow the old version number library, libpng.so, to be removed from
|
|
|
|
# the build
|
|
|
|
AC_ARG_WITH(libpng-compat,
|
|
|
|
AC_HELP_STRING([--with-libpng-compat],
|
|
|
|
[Generate the obsolete libpng.so library @<:@default=yes@:>@]),
|
|
|
|
[if test "${withval}" = no; then
|
|
|
|
compatlib=
|
2006-04-23 18:46:00 +00:00
|
|
|
AC_MSG_NOTICE([libpng.so will not be built])
|
2006-03-02 13:23:18 +00:00
|
|
|
else
|
|
|
|
compatlib=libpng.la
|
|
|
|
fi],
|
2006-04-23 18:46:00 +00:00
|
|
|
[compatlib=libpng.la])
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_SUBST([compatlib])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
2006-03-02 13:23:18 +00:00
|
|
|
# Config files, substituting as above
|
2006-12-03 03:09:29 +00:00
|
|
|
AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc-configure.in])
|
2006-03-02 13:23:18 +00:00
|
|
|
AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
|
|
|
|
[chmod +x libpng-config])
|
2004-12-03 00:14:51 +00:00
|
|
|
|
|
|
|
AC_OUTPUT
|