1AC_MSG_CHECKING([for ctime_r]) 2if test "$ac_cv_func_ctime_r" = "yes"; then 3 AC_TRY_COMPILE([ 4 #include <time.h> 5 ],[ 6 char buf[31]; 7 time_t t; 8 ctime_r(&t, buf, 30); 9 ],[ 10 ac_cv_ctime_args=3 11 AC_DEFINE([HAVE_CTIME_R_3],1,[ctime_r takes 3 arguments]) 12 ],[ 13 ac_cv_ctime_args=2 14 AC_DEFINE([HAVE_CTIME_R_2],1,[ctime_r takes 2 arguments]) 15 ]) 16 17 AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments]) 18fi 19