view modules/math @ 9375:96fea5b2eb11

Implement 'round', 'roundf', 'roundl' modules.
author Ben Pfaff <blp@cs.stanford.edu>
date Sat, 20 Oct 2007 13:08:26 -0700
parents 3191943555eb
children 1c5d0b856e8b
line wrap: on
line source

Description:
A GNU-like <math.h>.

Files:
lib/math.in.h
m4/math_h.m4

Depends-on:
include_next
link-warning

configure.ac:
gl_MATH_H

Makefile.am:
BUILT_SOURCES += math.h

# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
math.h: math.in.h
	rm -f $@-t $@
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
	  sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
	      -e 's|@''NEXT_MATH_H''@|$(NEXT_MATH_H)|g' \
	      -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
	      -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
	      -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
	      -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
	      -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
	      -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
	      -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
	      -e 's|@''GNULIB_MATHL''@|$(GNULIB_MATHL)|g' \
	      -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
	      -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
	      -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
	      -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
	      -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
	      -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
	      -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
	      -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
	      -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
	      -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
	      -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
	      -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
	      -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
	      -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
	      -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
	      -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
	      -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
	      -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
	      -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
	      -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
	      -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
	      -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
	      -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
	      -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
	      -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
	      -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
	      -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
	      -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
	      -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
	      -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
	      -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
	      -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
	      -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
	      < $(srcdir)/math.in.h; \
	} > $@-t
	mv $@-t $@
MOSTLYCLEANFILES += math.h math.h-t

Include:
<math.h>

License:
LGPL

Maintainer:
all