Skip to content

Commit

Permalink
2009-10-10 Tatsuhiro Tsujikawa <[email protected]>
Browse files Browse the repository at this point in the history
	Added AC_FUNC_STRTOD and AC_TYPE_PID_T.  Check function for pow,
	utime. Check header for utime.h.
	* configure.ac
  • Loading branch information
tatsuhiro-t committed Oct 10, 2009
1 parent 1af73e3 commit fb70a0e
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 13 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2009-10-10 Tatsuhiro Tsujikawa <[email protected]>

Added AC_FUNC_STRTOD and AC_TYPE_PID_T. Check function for pow,
utime. Check header for utime.h.
* configure.ac

2009-10-10 Tatsuhiro Tsujikawa <[email protected]>

Use AC_FUNC_FORK. Replaced HAVE_FORK with HAVE_WORKING_FORK.
Expand Down
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
Expand Down
9 changes: 9 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@
/* Define if your printf() function supports format strings with positions. */
#undef HAVE_POSIX_PRINTF

/* Define to 1 if you have the `pow' function. */
#undef HAVE_POW

/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
#undef HAVE_PTHREAD_MUTEX_RECURSIVE

Expand Down Expand Up @@ -457,6 +460,12 @@
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP

/* Define to 1 if you have the `utime' function. */
#undef HAVE_UTIME

/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H

/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK

Expand Down
141 changes: 129 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ HAVE_POSIX_FALLOCATE_FALSE
HAVE_POSIX_FALLOCATE_TRUE
HAVE_EPOLL_FALSE
HAVE_EPOLL_TRUE
POW_LIB
LIBOBJS
POSUB
LTLIBINTL
Expand Down Expand Up @@ -7680,6 +7681,7 @@ for ac_header in argz.h \
sys/time.h \
termios.h \
unistd.h \
utime.h \
wchar.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Expand Down Expand Up @@ -8140,6 +8142,17 @@ _ACEOF
;;
esac

ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define pid_t int
_ACEOF

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
$as_echo_n "checking for working volatile... " >&6; }
if test "${ac_cv_c_volatile+set}" = set; then :
Expand Down Expand Up @@ -14054,17 +14067,6 @@ fi
done


ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define pid_t int
_ACEOF

fi

for ac_header in vfork.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
Expand Down Expand Up @@ -14279,6 +14281,119 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
$as_echo_n "checking for working strtod... " >&6; }
if test "${ac_cv_func_strtod+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_strtod=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#ifndef strtod
double strtod ();
#endif
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))
return 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)
return 1;
}
return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_func_strtod=yes
else
ac_cv_func_strtod=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
$as_echo "$ac_cv_func_strtod" >&6; }
if test $ac_cv_func_strtod = no; then
case " $LIBOBJS " in
*" strtod.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strtod.$ac_objext"
;;
esac

ac_fn_cxx_check_func "$LINENO" "pow" "ac_cv_func_pow"
if test "x$ac_cv_func_pow" = x""yes; then :

fi

if test $ac_cv_func_pow = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
$as_echo_n "checking for pow in -lm... " >&6; }
if test "${ac_cv_lib_m_pow+set}" = set; 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 pow ();
int
main ()
{
return pow ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_m_pow=yes
else
ac_cv_lib_m_pow=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_pow" >&5
$as_echo "$ac_cv_lib_m_pow" >&6; }
if test "x$ac_cv_lib_m_pow" = x""yes; then :
POW_LIB=-lm
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
fi

fi

fi

for ac_func in __argz_count \
__argz_next \
__argz_stringify \
Expand All @@ -14297,6 +14412,7 @@ for ac_func in __argz_count \
munmap \
nl_langinfo \
posix_memalign \
pow \
putenv \
rmdir \
select \
Expand All @@ -14316,7 +14432,8 @@ for ac_func in __argz_count \
strtoull \
tzset \
unsetenv \
usleep
usleep \
utime
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
Expand Down
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ AC_CHECK_HEADERS([argz.h \
sys/time.h \
termios.h \
unistd.h \
utime.h \
wchar.h])

# Checks for typedefs, structures, and compiler characteristics.
Expand All @@ -233,6 +234,7 @@ AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_TYPE_PID_T
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
AC_C_BIGENDIAN
Expand All @@ -252,6 +254,7 @@ AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_FUNC_STRTOD
AC_CHECK_FUNCS([__argz_count \
__argz_next \
__argz_stringify \
Expand All @@ -270,6 +273,7 @@ AC_CHECK_FUNCS([__argz_count \
munmap \
nl_langinfo \
posix_memalign \
pow \
putenv \
rmdir \
select \
Expand All @@ -289,7 +293,8 @@ AC_CHECK_FUNCS([__argz_count \
strtoull \
tzset \
unsetenv \
usleep])
usleep \
utime])

if test "x$enable_epoll" = "xyes"; then
AC_CHECK_FUNCS([epoll_create], [have_epoll=yes])
Expand Down
1 change: 1 addition & 0 deletions doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
Expand Down

0 comments on commit fb70a0e

Please sign in to comment.