mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
Simplify socklen_t type detection
The previous version of AC_CHECK_TYPE() which didn't accept passing headers is obsolete anyway. The new one can be told which headers to include. Also test for sys/socket.h just for sanity. cf. https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Generic-Types.html https://svn.opendnssec.org/home/jerry/memory-usage/ldns-1.6.10/acx_nlnetlabs.m4
This commit is contained in:
parent
9af3df4e9d
commit
1f9ad64ee5
24
configure.ac
24
configure.ac
@ -20,7 +20,7 @@ AC_PATH_PROG(perlpath, perl)
|
|||||||
AC_CHECK_HEADERS(unistd.h dirent.h sys/ioctl.h sys/resource.h)
|
AC_CHECK_HEADERS(unistd.h dirent.h sys/ioctl.h sys/resource.h)
|
||||||
|
|
||||||
# check posix headers..
|
# 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
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
@ -206,21 +206,13 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then
|
|||||||
CFLAGS="$CFLAGS -Wall"
|
CFLAGS="$CFLAGS -Wall"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would
|
AC_CHECK_TYPE(socklen_t, ,
|
||||||
dnl * accept header files where to find the typedef..
|
[AC_DEFINE([socklen_t], [int], [Define to 'int' if <sys/socket.h> doesn't define.])], [
|
||||||
AC_MSG_CHECKING([for socklen_t])
|
AC_INCLUDES_DEFAULT
|
||||||
AC_CACHE_VAL(irssi_cv_type_socklen_t,
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
[AC_TRY_COMPILE([
|
# include <sys/socket.h>
|
||||||
#include <sys/types.h>
|
#endif
|
||||||
#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_SIZEOF(int)
|
AC_CHECK_SIZEOF(int)
|
||||||
AC_CHECK_SIZEOF(long)
|
AC_CHECK_SIZEOF(long)
|
||||||
|
Loading…
Reference in New Issue
Block a user