mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
* acfunctions.m4 (_AC_LIBOBJ_STRTOD, AC_FUNC_STRTOD,
AM_FUNC_STRTOD): New macros, from Automake. * acfunctions: Adjust.
This commit is contained in:
parent
99d2fcb4af
commit
7bd04c77a0
@ -1,3 +1,9 @@
|
||||
2000-08-01 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* acfunctions.m4 (_AC_LIBOBJ_STRTOD, AC_FUNC_STRTOD,
|
||||
AM_FUNC_STRTOD): New macros, from Automake.
|
||||
* acfunctions: Adjust.
|
||||
|
||||
2000-08-01 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* acidentifiers: Catch ptrdiff_t.
|
||||
|
2
NEWS
2
NEWS
@ -190,7 +190,7 @@ test cases in this new frame work.
|
||||
** Specific Macros
|
||||
- AC_FUNC_CHOWN, AC_FUNC_MALLOC, AC_FUNC_STRERROR_R,
|
||||
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_STAT, AC_FUNC_LSTAT,
|
||||
AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK.
|
||||
AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD.
|
||||
New.
|
||||
|
||||
- AC_FUNC_GETGROUPS
|
||||
|
2
TODO
2
TODO
@ -97,6 +97,8 @@ this. Most should be removed.
|
||||
** AC_EXEXT, AC_OBJEXT
|
||||
Support should be enabled by default.
|
||||
|
||||
** Macros now swallowed by Autoconf.
|
||||
error.m4, obstack.m4, ptrdiff.m4, strtod.m4, termios.m4, winsz.m4.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
@ -33,6 +33,7 @@ stat AC_FUNC_STAT
|
||||
strcoll AC_FUNC_STRCOLL
|
||||
strerror_r AC_FUNC_STRERROR_R
|
||||
strftime AC_FUNC_STRFTIME
|
||||
strtod AC_FUNC_STRTOD
|
||||
utime AC_FUNC_UTIME_NULL
|
||||
vfork AC_FUNC_VFORK
|
||||
vfprintf AC_FUNC_VPRINTF
|
||||
|
@ -1201,6 +1201,64 @@ AC_DEFUN([AC_FUNC_STAT], [_AC_FUNC_STAT(stat)])
|
||||
AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)])
|
||||
|
||||
|
||||
# _AC_LIBOBJ_STRTOD
|
||||
# -----------------
|
||||
define([_AC_LIBOBJ_STRTOD],
|
||||
[AC_LIBOBJ(strtod)
|
||||
AC_CHECK_FUNC(pow)
|
||||
if test $ac_cv_func_pow = no; then
|
||||
AC_CHECK_LIB(m, pow,
|
||||
[POW_LIB=-lm],
|
||||
[AC_MSG_WARN(can't find library containing definition of pow)])
|
||||
fi
|
||||
])# _AC_LIBOBJ_STRTOD
|
||||
|
||||
|
||||
# AC_FUNC_STRTOD
|
||||
# --------------
|
||||
AC_DEFUN([AC_FUNC_STRTOD],
|
||||
[AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod,
|
||||
[AC_TRY_RUN([
|
||||
double strtod ();
|
||||
int
|
||||
main()
|
||||
{
|
||||
{
|
||||
/* Some versions of Linux strtod mis-parse strings with leading '+'. */
|
||||
char *string = " +69";
|
||||
char *term;
|
||||
double value;
|
||||
value = strtod (string, &term);
|
||||
if (value != 69 || term != (string + 4))
|
||||
exit (1);
|
||||
}
|
||||
|
||||
{
|
||||
/* Under Solaris 2.4, strtod returns the wrong value for the
|
||||
terminating character under some conditions. */
|
||||
char *string = "NaN";
|
||||
char *term;
|
||||
strtod (string, &term);
|
||||
if (term != string && *(term - 1) == 0)
|
||||
exit (1);
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
ac_cv_func_strtod=yes,
|
||||
ac_cv_func_strtod=no,
|
||||
ac_cv_func_strtod=no)])
|
||||
if test $ac_cv_func_strtod = no; then
|
||||
_AC_LIBOBJ_STRTOD
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AU::AM_FUNC_STRTOD
|
||||
# -------------------
|
||||
AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
|
||||
|
||||
|
||||
# AC_FUNC_STRERROR_R
|
||||
# ------------------
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
|
@ -3140,6 +3140,15 @@ If the @code{strcoll} function exists and works correctly, define
|
||||
definitions of @code{strcoll}, which should not be used.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRTOD
|
||||
@maindex FUNC_STRTOD
|
||||
@ovindex POW_LIB
|
||||
If the @code{strtod} function does not exist or doesn't work correctly,
|
||||
ask for an @code{AC_LIBOBJ} replacement of @samp{strtod}. In this case,
|
||||
because @file{strtod.c} is likely to need @samp{pow}, set the output
|
||||
variable @code{POW_LIB} to the extra library needed.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRERROR_R
|
||||
@maindex FUNC_STRERROR_R
|
||||
@cvindex HAVE_STRERROR_R
|
||||
|
@ -1201,6 +1201,64 @@ AC_DEFUN([AC_FUNC_STAT], [_AC_FUNC_STAT(stat)])
|
||||
AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)])
|
||||
|
||||
|
||||
# _AC_LIBOBJ_STRTOD
|
||||
# -----------------
|
||||
define([_AC_LIBOBJ_STRTOD],
|
||||
[AC_LIBOBJ(strtod)
|
||||
AC_CHECK_FUNC(pow)
|
||||
if test $ac_cv_func_pow = no; then
|
||||
AC_CHECK_LIB(m, pow,
|
||||
[POW_LIB=-lm],
|
||||
[AC_MSG_WARN(can't find library containing definition of pow)])
|
||||
fi
|
||||
])# _AC_LIBOBJ_STRTOD
|
||||
|
||||
|
||||
# AC_FUNC_STRTOD
|
||||
# --------------
|
||||
AC_DEFUN([AC_FUNC_STRTOD],
|
||||
[AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod,
|
||||
[AC_TRY_RUN([
|
||||
double strtod ();
|
||||
int
|
||||
main()
|
||||
{
|
||||
{
|
||||
/* Some versions of Linux strtod mis-parse strings with leading '+'. */
|
||||
char *string = " +69";
|
||||
char *term;
|
||||
double value;
|
||||
value = strtod (string, &term);
|
||||
if (value != 69 || term != (string + 4))
|
||||
exit (1);
|
||||
}
|
||||
|
||||
{
|
||||
/* Under Solaris 2.4, strtod returns the wrong value for the
|
||||
terminating character under some conditions. */
|
||||
char *string = "NaN";
|
||||
char *term;
|
||||
strtod (string, &term);
|
||||
if (term != string && *(term - 1) == 0)
|
||||
exit (1);
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
ac_cv_func_strtod=yes,
|
||||
ac_cv_func_strtod=no,
|
||||
ac_cv_func_strtod=no)])
|
||||
if test $ac_cv_func_strtod = no; then
|
||||
_AC_LIBOBJ_STRTOD
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AU::AM_FUNC_STRTOD
|
||||
# -------------------
|
||||
AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
|
||||
|
||||
|
||||
# AC_FUNC_STRERROR_R
|
||||
# ------------------
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
|
@ -33,6 +33,7 @@ stat AC_FUNC_STAT
|
||||
strcoll AC_FUNC_STRCOLL
|
||||
strerror_r AC_FUNC_STRERROR_R
|
||||
strftime AC_FUNC_STRFTIME
|
||||
strtod AC_FUNC_STRTOD
|
||||
utime AC_FUNC_UTIME_NULL
|
||||
vfork AC_FUNC_VFORK
|
||||
vfprintf AC_FUNC_VPRINTF
|
||||
|
Loading…
Reference in New Issue
Block a user