- AM_FUNC_GETLINE
- if test $am_cv_func_working_getline != yes; then
- AC_CHECK_FUNCS(getdelim)
- fi
- AM_FUNC_OBSTACK
-
- AM_FUNC_STRTOD
- AC_SUBST(POW_LIBM)
- test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
-
- jm_LANGINFO_CODESET
+ # for test.c
+ AC_CHECK_FUNCS(setreuid setregid)
+
+ AC_FUNC_STRTOD
+ AC_REQUIRE([UTILS_SYS_OPEN_MAX])
+ AC_REQUIRE([GL_FUNC_GETCWD_PATH_MAX])
+ AC_REQUIRE([GL_FUNC_READDIR])
+
+ # See if linking `seq' requires -lm.
+ # It does on nearly every system. The single exception (so far) is
+ # BeOS which has all the math functions in the normal runtime library
+ # and doesn't have a separate math library.
+
+ AC_SUBST(SEQ_LIBM)
+ ac_seq_body='
+ static double x, y;
+ x = floor (x);
+ x = rint (x);
+ x = modf (x, &y);'
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, ,
+ [ac_seq_save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, SEQ_LIBM=-lm)
+ LIBS="$ac_seq_save_LIBS"
+ ])
+
+ AM_LANGINFO_CODESET