summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@0x90.dk>2014-12-16 19:44:20 +0100
committerAlexander Færøy <ahf@0x90.dk>2014-12-16 19:44:20 +0100
commit1c4495ec77265dd6c1c2c1fa7c88426fc68f5450 (patch)
tree10c8b1d5e9b6bd7c43790046638b6ce91fd1d1d1 /configure.ac
parent1f2b17181963d81ef431f8cbb900efdf3369203c (diff)
parentc855fef06405e720cb1ceea98665af74136b61ef (diff)
downloadirssi-1c4495ec77265dd6c1c2c1fa7c88426fc68f5450.zip
Merge pull request #108 from mmuman/buildsystem-cleanup
Buildsystem cleanup
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 10 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac
index 477f8c4d..c312d065 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,6 @@ AM_INIT_AUTOMAKE([1.9 no-define foreign])
AM_MAINTAINER_MODE
-AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
@@ -20,7 +19,7 @@ AC_PATH_PROG(perlpath, perl)
AC_CHECK_HEADERS(unistd.h dirent.h sys/ioctl.h sys/resource.h)
# check posix headers..
-AC_CHECK_HEADERS(sys/time.h sys/utsname.h regex.h)
+AC_CHECK_HEADERS(sys/socket.h sys/time.h sys/utsname.h regex.h)
AC_SYS_LARGEFILE
@@ -197,38 +196,22 @@ case "$host_os" in
esac
-AC_CHECK_FUNC(socket, [], [
- AC_CHECK_LIB(socket, socket, [
- LIBS="$LIBS -lsocket"
- ])
-])
+AC_SEARCH_LIBS([socket], [socket])
-AC_CHECK_FUNC(inet_addr, [], [
- AC_CHECK_LIB(nsl, inet_addr, [
- LIBS="$LIBS -lnsl"
- ])
-])
+AC_SEARCH_LIBS([inet_addr], [nsl])
dnl * gcc specific options
if test "x$ac_cv_prog_gcc" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
-dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would
-dnl * accept header files where to find the typedef..
-AC_MSG_CHECKING([for socklen_t])
-AC_CACHE_VAL(irssi_cv_type_socklen_t,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>],
-[socklen_t t = 0; return((int)t); ],
-irssi_cv_type_socklen_t=yes,
-irssi_cv_type_socklen_t=no,
-)])
-if test $irssi_cv_type_socklen_t = no; then
-AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
-fi
-AC_MSG_RESULT($irssi_cv_type_socklen_t)
+AC_CHECK_TYPE(socklen_t, ,
+ [AC_DEFINE([socklen_t], [int], [Define to 'int' if <sys/socket.h> doesn't define.])], [
+AC_INCLUDES_DEFAULT
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)