Bump to lsof 4.91
[platform/upstream/lsof.git] / Configure
index e4a25a2..f3dc281 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -14,7 +14,7 @@
 # shell script, named $LSOF_MK, that places its source modules in this
 # directory.
 #
-# $Id: Configure,v 1.164 2015/07/07 20:16:58 abe Exp $
+# $Id: Configure,v 1.165 2018/02/14 14:18:48 abe Exp $
 
 # LSOF_CFLAGS_OVERRIDE=1 may be introduced through the environment to cause
 #      the library Makefile's CFLAGS definition to override any in the
@@ -293,8 +293,8 @@ do
       echo "rm -rf AFSHeaders AFSVersion solaris11 version.h vnode_if.h"
       rm -f ${LSOF_HLP_BASE}* cd9660_node.h lockf_owner.h fbsd_minor.h
       echo "rm -f ${LSOF_HLP_BASE}* cd9660_node.h lockf_owner.h fbsd_minor.h"
-      rm -f opt_kdtrace.h
-      echo "rm -f opt_kdtrace.h"
+      rm -f opt_kdtrace.h opt_random.h
+      echo "rm -f opt_kdtrace.h opt_random.h"
       rm -f dialects/aix/aix5/j2/j2_snapshot.h
       echo "rm -f dialects/aix/aix5/j2/j2_snapshot.h"
       rm -f dialects/sun/solaris10     # DEBUG -- for s10_44
@@ -1620,6 +1620,10 @@ kernel generation process.
        LSOF_TSTBIGF=" "
        LSOF_VERS=11000
        ;;
+      12*)
+       LSOF_TSTBIGF=" "
+       LSOF_VERS=12000
+       ;;
       *)
        echo Unknown FreeBSD release: `uname -r`
        rm -f $LSOF_HLP
@@ -1631,7 +1635,7 @@ kernel generation process.
     # Clear LSOF_UNSUP message for supported versions of FreeBSD.
     
     case $LSOF_VERS in  # {
-    4090|8020|8030|8040|9000|10000|11000)
+    4090|8020|8030|8040|9000|10000|11000|12000)
       LSOF_UNSUP=""
       ;;
     esac       # }
@@ -1707,6 +1711,22 @@ kernel generation process.
       fi       # }
     fi # }
 
+    # Check the C library for closefrom and dup2.
+
+      if test -r /usr/lib/libc.a       # {
+      then
+       nm /usr/lib/libc.a | grep -q "W dup2"
+       if test $? -eq 0        # {
+       then
+         LSOF_CFGF="$LSOF_CFGF -DHAS_DUP2"
+       fi      # }
+       nm /usr/lib/libc.a | grep -q "W closefrom"
+       if test $? -eq 0        # {
+       then
+         LSOF_CFGF="$LSOF_CFGF -DHAS_CLOSEFROM"
+       fi      # }
+      fi       # }
+
     # Do FreeBSD version-specific stuff.
 
     case $LSOF_VERS in # {
@@ -1886,6 +1906,19 @@ cpumask_t c;
 
        # Do FreeBSD 6.0 and higher version-specific stuff.
 
+         if test -r ${LSOF_INCLUDE}/sys/_types.h       # {
+         then
+           grep __dev_t ${LSOF_INCLUDE}/sys/_types.h | grep -q 64
+           if test $? -eq 0    # {
+           then
+             if test "X$LSOF_TSTDFLG" = "X"    # {
+             then
+               LSOF_TSTDFLG="-DLT_DEV64"
+             else
+               LSOF_TSTDFLG="$LSOF_TSTDFLG -DLT_DEV64"
+             fi        # }
+           fi  # }
+         fi    # }
          if test -r ${LSOF_INCLUDE}/ufs/ufs/inode.h    # {
          then
            grep -q i_din2 ${LSOF_INCLUDE}/ufs/ufs/inode.h
@@ -1893,6 +1926,11 @@ cpumask_t c;
            then
              LSOF_CFGF="$LSOF_CFGF -DHAS_UFS1_2"
            fi  # }
+           grep -q i_dev ${LSOF_INCLUDE}/ufs/ufs/inode.h
+           if test $? -ne 0    # {
+           then
+             LSOF_CFGF="$LSOF_CFGF -DHAS_NO_IDEV"
+           fi  # }
          fi    # }
          if test -r ${LSOF_INCLUDE}/sys/conf.h # {
          then
@@ -1958,6 +1996,12 @@ FBSD_MINOR3
            LSOF_CFGF="$LSOF_CFGF -DHAS_SYS_SX_H"
          fi    # }
 
+       # Do FUSE file system test,
+
+         if test -r ${FREEBSD_SYS}/fs/fuse/fuse_node.h # {
+         then
+           LSOF_CFGF="$LSOF_CFGF -DHASFUSEFS"
+         fi    # }
        # Do ZFS test.  Try for the newer OpenSolaris files first -- i.e.,
        # the ones in ${FREEBSD_SYS}/cddl/contrib/opensolaris.  If that fails,
        # try for the older ones in ${FREEBSD}/contrib/opensolaris.
@@ -1999,6 +2043,15 @@ FBSD_MINOR3
                  LSOF_FBSD_ZFS_CFGF="$LSOF_FBSD_ZFS_CFGF -DHAS_CV_TIMEDWAIT_SBT"
                fi      # }
            fi  #}
+           if test -r /usr/include/sys/random.h        # {
+           then
+             grep -q opt_random.h /usr/include/sys/random.h
+             if test $? -eq 0  # {
+             then
+               rm -f opt_random.h
+               touch opt_random.h
+             fi        # }
+           fi  # }
          fi    # }
          if test -r ${LSOF_INCLUDE}/sys/vnode.h        # {
          then
@@ -2935,6 +2988,17 @@ return(0); }
     then
       LSOF_CFGF="$LSOF_CFGF -DHASUXSOCKEPT"
     fi # }
+
+  # Test for pseudoterminal endpoint support.
+
+    if test -r ${LSOF_INCLUDE}/linux/major.h # {
+    then
+      grep -q TTYAUX_MAJOR ${LSOF_INCLUDE}/linux/major.h
+      if test $? -eq 0 # {
+      then
+       LSOF_CFGF="$LSOF_CFGF -DHASPTYEPT"
+      fi       # }
+    fi # }
     LSOF_DIALECT_DIR="linux"
     LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
     ;;
@@ -4868,6 +4932,14 @@ return(0); }
            LSOF_CFGF="$LSOF_CFGF -DHAS_PC_DIRENTPERSEC"
          fi    # }
        fi      # }
+       if test -r ${LSOF_INCLUDE}/sys/aio_req.h        # {
+       then
+         grep "struct[         ]aio_req" ${LSOF_INCLUDE}/sys/aio_req.h > /dev/null 2>&1
+         if test $? -eq 0      # {
+         then
+           LSOF_CFGF="$LSOF_CFGF -DHAS_AIO_REQ_STRUCT"
+         fi    # }
+       fi      # }
       fi       # }
       if test -r ${LSOF_INCLUDE}/sys/zone.h    # {
       then