[libpng15] updated configure files

This commit is contained in:
John Bowler 2011-11-04 21:03:39 -05:00 committed by Glenn Randers-Pehrson
parent a004e23a4c
commit fc45f68623
3 changed files with 128 additions and 0 deletions

View File

@ -3,6 +3,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the `feenableexcept' function. */
#undef HAVE_FEENABLEEXCEPT
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
@ -88,5 +91,19 @@
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const #undef const
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to `unsigned int' if <sys/types.h> does not define. */ /* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t #undef size_t

105
configure vendored
View File

@ -12269,6 +12269,52 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
if ${ac_cv_c_restrict+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_restrict=no
# The order here caters to the fact that C++ does not require restrict.
for ac_kw in __restrict __restrict__ _Restrict restrict; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
typedef int * int_ptr;
int foo (int_ptr $ac_kw ip) {
return ip[0];
}
int
main ()
{
int s[1];
int * $ac_kw t = s;
t[0] = 0;
return foo(t)
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_restrict=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
test "$ac_cv_c_restrict" != no && break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
$as_echo "$ac_cv_c_restrict" >&6; }
case $ac_cv_c_restrict in
restrict) ;;
no) $as_echo "#define restrict /**/" >>confdefs.h
;;
*) cat >>confdefs.h <<_ACEOF
#define restrict $ac_cv_c_restrict
_ACEOF
;;
esac
# Checks for library functions. # Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
@ -12560,6 +12606,65 @@ fi
fi fi
# The following is for pngvalid, to ensure it catches FP errors even on
# platforms that don't enable FP exceptions, the function appears in the math
# library (typically), it's not an error if it is not found.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5
$as_echo_n "checking for feenableexcept in -lm... " >&6; }
if ${ac_cv_lib_m_feenableexcept+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char feenableexcept ();
int
main ()
{
return feenableexcept ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_m_feenableexcept=yes
else
ac_cv_lib_m_feenableexcept=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5
$as_echo "$ac_cv_lib_m_feenableexcept" >&6; }
if test "x$ac_cv_lib_m_feenableexcept" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
LIBS="-lm $LIBS"
fi
for ac_func in feenableexcept
do :
ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept"
if test "x$ac_cv_func_feenableexcept" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FEENABLEEXCEPT 1
_ACEOF
fi
done
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
LIBPNG_DEFINES=$LIBPNG_DEFINES LIBPNG_DEFINES=$LIBPNG_DEFINES

View File

@ -76,6 +76,7 @@ AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
AC_C_CONST AC_C_CONST
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_STRUCT_TM AC_STRUCT_TM
AC_C_RESTRICT
# Checks for library functions. # Checks for library functions.
AC_FUNC_STRTOD AC_FUNC_STRTOD
@ -90,6 +91,11 @@ AC_CHECK_LIB(z, zlibVersion, ,
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
AC_ERROR([zlib not installed]))) AC_ERROR([zlib not installed])))
# The following is for pngvalid, to ensure it catches FP errors even on
# platforms that don't enable FP exceptions, the function appears in the math
# library (typically), it's not an error if it is not found.
AC_CHECK_LIB([m], [feenableexcept])
AC_CHECK_FUNCS([feenableexcept])
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
LIBPNG_DEFINES=$LIBPNG_DEFINES LIBPNG_DEFINES=$LIBPNG_DEFINES