summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorroot <root>2008-05-11 00:06:25 +0000
committerroot <root>2008-05-11 00:06:25 +0000
commit1adb313f215bbe062eefa2c03e871d141458f749 (patch)
tree050091a632433b0bf16148072f66bc524d283591 /configure.ac
parentbb92967cd6ae5888c071f8f2c8441825270ef2ba (diff)
*** empty log message ***
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac107
1 files changed, 11 insertions, 96 deletions
diff --git a/configure.ac b/configure.ac
index 676b4f6..5d2ea5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,105 +1,20 @@
AC_PREREQ(2.59)
AC_INIT
+AC_CONFIG_SRCDIR([eio.h])
AC_CONFIG_HEADERS([config.h])
-AC_PROG_CC
-
-AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[
-#include <sys/types.h>
-#include <sys/time.h>
-#include <utime.h>
-struct timeval tv[2];
-int res;
-int fd;
-int main(void)
-{
- res = futimes (fd, tv);
- return 0;
-}
-]],ac_cv_futimes=yes,ac_cv_futimes=no)])
-test $ac_cv_futimes = yes && AC_DEFINE(HAVE_FUTIMES, 1, futimes(2) is available)
-
-AC_CACHE_CHECK(for readahead, ac_cv_readahead, [AC_LINK_IFELSE([
-#include <fcntl.h>
-int main(void)
-{
- int fd = 0;
- off64_t offset = 1;
- size_t count = 2;
- ssize_t res;
- res = readahead (fd, offset, count);
- return 0;
-}
-],ac_cv_readahead=yes,ac_cv_readahead=no)])
-test $ac_cv_readahead = yes && AC_DEFINE(HAVE_READAHEAD, 1, readahead(2) is available (linux))
+AM_INIT_AUTOMAKE(libev,3.31)
+AM_MAINTAINER_MODE
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
-AC_CACHE_CHECK(for fdatasync, ac_cv_fdatasync, [AC_LINK_IFELSE([
-#include <unistd.h>
-int main(void)
-{
- int fd = 0;
- fdatasync (fd);
- return 0;
-}
-],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)])
-test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available)
-
-AC_CACHE_CHECK(for pread and pwrite, ac_cv_preadwrite, [AC_LINK_IFELSE([
-#include <unistd.h>
-int main(void)
-{
- int fd = 0;
- size_t count = 1;
- char buf;
- off_t offset = 1;
- ssize_t res;
- res = pread (fd, &buf, count, offset);
- res = pwrite (fd, &buf, count, offset);
- return 0;
-}
-],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)])
-test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available)
+AC_PROG_CC
-AC_CACHE_CHECK(for readdir_r, ac_cv_readdir_r, [AC_LINK_IFELSE([
-#include <dirent.h>
-int main(void)
-{
- DIR *dir = 0;
- struct dirent ent, *eres;
- int res = readdir_r (dir, &ent, &eres);
- return 0;
-}
-],ac_cv_readdir_r=yes,ac_cv_readdir_r=no)])
-test $ac_cv_readdir_r = yes && AC_DEFINE(HAVE_READDIR_R, 1, readdir_r is available)
+if test "x$GCC" = xyes ; then
+ CFLAGS="$CFLAGS -O3"
+fi
-AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([
-# include <sys/types.h>
-#if __linux
-# include <sys/sendfile.h>
-#elif __freebsd
-# include <sys/socket.h>
-# include <sys/uio.h>
-#elif __hpux
-# include <sys/socket.h>
-#else
-# error unsupported architecture
-#endif
-int main(void)
-{
- int fd = 0;
- off_t offset = 1;
- size_t count = 2;
- ssize_t res;
-#if __linux
- res = sendfile (fd, fd, offset, count);
-#elif __freebsd
- res = sendfile (fd, fd, offset, count, 0, &offset, 0);
-#elif __hpux
- res = sendfile (fd, fd, offset, count, 0, 0);
-#endif
- return 0;
-}
-],ac_cv_sendfile=yes,ac_cv_sendfile=no)])
-test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported)
+m4_include([libeio.m4])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT