Commit 74430008 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

configure.ac: changed check of isnan()

parent 578b2147
......@@ -2139,6 +2139,52 @@ fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
} # ac_fn_c_check_header_mongrel
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
#ifndef $as_decl_name
#ifdef __cplusplus
(void) $as_decl_use;
#else
(void) $as_decl_name;
#endif
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
......@@ -2526,7 +2572,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
 
 
 
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
......@@ -10908,6 +10953,7 @@ CC="$lt_save_CC"
# Only expand once:
 
 
# Check building environment
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
......@@ -15634,7 +15680,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
FC=no
export FC
# ----------------------------------------------------------------------
# Check large file support on 32 bit system
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
......@@ -15836,7 +15882,7 @@ rm -rf conftest*
 
fi
 
# ----------------------------------------------------------------------
# Checks for library functions.
 
 
......@@ -16039,7 +16085,7 @@ $as_echo "#define HAVE_MMAP 1" >>confdefs.h
fi
rm -f conftest.mmap conftest.txt
 
# ----------------------------------------------------------------------
# Checks for library malloc.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lmalloc" >&5
$as_echo_n "checking for malloc in -lmalloc... " >&6; }
......@@ -16086,7 +16132,7 @@ _ACEOF
 
fi
 
# ----------------------------------------------------------------------
# Checks for structures.
ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
......@@ -16098,7 +16144,7 @@ _ACEOF
 
fi
 
# ----------------------------------------------------------------------
# Checks for header files
for ac_header in sys/resource.h
do :
......@@ -16136,7 +16182,7 @@ fi
 
done
 
# ----------------------------------------------------------------------
# Checks for the availability of functions
for ac_func in mallinfo
do :
......@@ -16149,18 +16195,20 @@ _ACEOF
fi
done
 
# ----------------------------------------------------------------------
# Checks for the availability of ANSI-C99 functions
for ac_func in isnan
do :
ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan"
if test "x$ac_cv_func_isnan" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ISNAN 1
_ACEOF
ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "$ac_includes_default
#include <math.h>
"
if test "x$ac_cv_have_decl_isnan" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
done
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_ISNAN $ac_have_decl
_ACEOF
 
for ac_func in getrlimit
do :
......
......@@ -5,7 +5,6 @@ AC_INIT([cdo], [1.5.7], [http://code.zmaw.de/projects/cdo])
CONFIG_ABORT=yes
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
......@@ -16,6 +15,7 @@ AM_MAINTAINER_MODE([disable])
# Set up libtool.
AC_MSG_NOTICE([setting up libtool])
LT_INIT
# Check building environment
AC_CHECK_TOOL([CC],[gcc],[:])
AC_PROG_CC_C99
......@@ -36,29 +36,30 @@ AC_PROG_CXX
FC=no
export FC
# ----------------------------------------------------------------------
# Check large file support on 32 bit system
AC_SYS_LARGEFILE
# ----------------------------------------------------------------------
# Checks for library functions.
AC_FUNC_MMAP
# ----------------------------------------------------------------------
# Checks for library malloc.
AC_CHECK_LIB(malloc, malloc)
# ----------------------------------------------------------------------
# Checks for structures.
AC_CHECK_MEMBERS([struct stat.st_blksize])
# ----------------------------------------------------------------------
# Checks for header files
AC_CHECK_HEADERS(sys/resource.h)
AC_CHECK_HEADERS(sys/times.h)
AC_CHECK_HEADERS(malloc.h)
# ----------------------------------------------------------------------
# Checks for the availability of functions
AC_CHECK_FUNCS(mallinfo)
# ----------------------------------------------------------------------
# Checks for the availability of ANSI-C99 functions
AC_CHECK_FUNCS(isnan)
AC_CHECK_DECLS([isnan],,,[AC_INCLUDES_DEFAULT
@%:@include <math.h>])
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(gethostname)
......
......@@ -64,7 +64,7 @@ char *strdup(const char *s);
#endif
#else
#ifndef DBL_IS_NAN
#if defined (HAVE_ISNAN)
#if defined (HAVE_DECL_ISNAN)
# define DBL_IS_NAN(x) (isnan(x))
#elif defined (FP_NAN)
# define DBL_IS_NAN(x) (fpclassify(x) == FP_NAN)
......
......@@ -6,6 +6,10 @@
/* Compiler version */
#undef COMP_VERSION
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
*/
#undef HAVE_DECL_ISNAN
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
......@@ -27,9 +31,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `isnan' function. */
#undef HAVE_ISNAN
/* Define to 1 if you have the <jasper.h> header file. */
#undef HAVE_JASPER_H
......@@ -215,6 +216,11 @@
/* Version number of package */
#undef VERSION
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment