Skip to content

Commit

Permalink
Make sure <sys/dlpi.h> is usable; it exists in SCO OpenServer 5, but it
Browse files Browse the repository at this point in the history
doesn't define what we need for DLPI support.
  • Loading branch information
yuguy committed Jun 12, 2008
1 parent dc637ab commit 16b2f49
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 3 deletions.
65 changes: 64 additions & 1 deletion configure
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.in Revision: 1.152 . # From configure.in Revision: 1.153 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59. # Generated by GNU Autoconf 2.59.
# #
Expand Down Expand Up @@ -6845,6 +6845,69 @@ echo "${ECHO_T}${enable_yydebug-no}" >&6
case "$V_PCAP" in case "$V_PCAP" in
dlpi) dlpi)
echo "$as_me:$LINENO: checking whether <sys/dlpi.h> is usable" >&5
echo $ECHO_N "checking whether <sys/dlpi.h> is usable... $ECHO_C" >&6
if test "${ac_cv_sys_dlpi_usable+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/dlpi.h>
int
main ()
{
int i = DL_PROMISC_PHYS;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_dlpi_usable=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_sys_dlpi_usable=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_sys_dlpi_usable" >&5
echo "${ECHO_T}$ac_cv_sys_dlpi_usable" >&6
if test $ac_cv_sys_dlpi_usable = no ; then
{ { echo "$as_me:$LINENO: error: <sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" >&5
echo "$as_me: error: <sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: checking for /dev/dlpi device" >&5 echo "$as_me:$LINENO: checking for /dev/dlpi device" >&5
echo $ECHO_N "checking for /dev/dlpi device... $ECHO_C" >&6 echo $ECHO_N "checking for /dev/dlpi device... $ECHO_C" >&6
if test -c /dev/dlpi ; then if test -c /dev/dlpi ; then
Expand Down
19 changes: 17 additions & 2 deletions configure.in
@@ -1,12 +1,12 @@
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.152 2008-06-11 09:05:10 guy Exp $ (LBL) dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.153 2008-06-12 19:59:57 guy Exp $ (LBL)
dnl dnl
dnl Copyright (c) 1994, 1995, 1996, 1997 dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved. dnl The Regents of the University of California. All rights reserved.
dnl dnl
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl dnl


AC_REVISION($Revision: 1.152 $) AC_REVISION($Revision: 1.153 $)
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_INIT(pcap.c) AC_INIT(pcap.c)


Expand Down Expand Up @@ -422,6 +422,21 @@ AC_MSG_RESULT(${enable_yydebug-no})
case "$V_PCAP" in case "$V_PCAP" in


dlpi) dlpi)
AC_MSG_CHECKING(whether <sys/dlpi.h> is usable)
AC_CACHE_VAL(ac_cv_sys_dlpi_usable,
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/time.h>
#include <sys/dlpi.h>
],
[int i = DL_PROMISC_PHYS;],
ac_cv_sys_dlpi_usable=yes,
ac_cv_sys_dlpi_usable=no))
AC_MSG_RESULT($ac_cv_sys_dlpi_usable)
if test $ac_cv_sys_dlpi_usable = no ; then
AC_MSG_ERROR(<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI)
fi
AC_MSG_CHECKING(for /dev/dlpi device) AC_MSG_CHECKING(for /dev/dlpi device)
if test -c /dev/dlpi ; then if test -c /dev/dlpi ; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
Expand Down

0 comments on commit 16b2f49

Please sign in to comment.