summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e0df7b8)
Both invocations of AC_LINK_IFELSE() check if a C structure is
defined. We don't need to run the linker for that, saving a few cycles
on Linux systems where both structures are defined.
AC_MSG_RESULT($msg)
UNSTASH_FLAGS
########################################################################### ucred
AC_MSG_RESULT($msg)
UNSTASH_FLAGS
########################################################################### ucred
-AC_MSG_CHECKING(for struct ucred)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+AC_CHECK_TYPE([struct ucred], [
+ AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
+], [], [
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
-]], [[
- struct ucred sucred; sucred.pid=0;
-]])],[have_ucred=yes],[have_ucred=no])
-AC_MSG_RESULT($have_ucred)
-if test ${have_ucred} = yes; then
- AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
-fi
########################################################################### curses
STASH_FLAGS
LIB_ARG_WITH([curses], [])
########################################################################### curses
STASH_FLAGS
LIB_ARG_WITH([curses], [])
LIB_SUBST_FLAGS(curses)
UNSTASH_FLAGS
########################################################################### ip_mreqn
LIB_SUBST_FLAGS(curses)
UNSTASH_FLAGS
########################################################################### ip_mreqn
-AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+AC_CHECK_TYPE([struct ip_mreqn], [
+ AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 if you have struct ip_mreqn)
+], [], [
#include <netdb.h>
#include <net/if.h>
#include <netdb.h>
#include <net/if.h>
-]], [[
- struct ip_mreqn mn;
- mn.imr_ifindex = 0;
-]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
-AC_MSG_RESULT($have_ip_mreqn)
-if test ${have_ip_mreqn} = yes; then
- AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 if you have struct ip_mreqn)
-fi
########################################################################### ogg
STASH_FLAGS
LIB_ARG_WITH([ogg], [-logg])
########################################################################### ogg
STASH_FLAGS
LIB_ARG_WITH([ogg], [-logg])