summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2005-02-22 16:12:34 +0000
committerNiels Provos <provos@gmail.com>2005-02-22 16:12:34 +0000
commita46c2609bfa4d68e78665dd55461af9b1ce9651b (patch)
treef082152501cff02ff1b2f5e3908c4b69e8f13f84 /configure.in
parent905ee67d0032eb86e4de37878c45cc4bd67cda47 (diff)
downloadlibevent-a46c2609bfa4d68e78665dd55461af9b1ce9651b.tar.gz
compilation fixes for IRIX; from Nick Mathewson <nickm@freehaven.net>
svn:r132
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in57
1 files changed, 57 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 52c2a3ef..c040b767 100644
--- a/configure.in
+++ b/configure.in
@@ -63,6 +63,48 @@ if test "x$ac_cv_header_sys_time_h" = "xyes"; then
)
fi
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timercmp in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timercmp
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERCMP, 1,
+ [Define if timercmp is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timerclear in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timerclear
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERCLEAR, 1,
+ [Define if timerclear is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timerisset in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timerisset
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERISSET, 1,
+ [Define if timerisset is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
@@ -277,4 +319,19 @@ AC_TRY_COMPILE([
[Define to unsigned int if you dont have it])]
)
+AC_MSG_CHECKING([whether our compiler supports __func__])
+AC_TRY_COMPILE([],
+ [void foo() { const char *cp = __func__; }],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
+ AC_TRY_COMPILE([],
+ [void foo() { const char *cp = __FUNCTION__; }],
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(__func__, __FUNCTION__,
+ [Define to appropriate substitue if compiler doesnt have __func__]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE(__func__, __FILE__,
+ [Define to appropriate substitue if compiler doesnt have __func__])))
+
AC_OUTPUT(Makefile test/Makefile sample/Makefile)