]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Autoconf: Refine reporting of os-proto.h. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Sat, 11 Feb 2023 23:36:14 +0000 (23:36 +0000)
committerDenis Ovsienko <[email protected]>
Sat, 11 Feb 2023 23:36:14 +0000 (23:36 +0000)
configure: WARNING: can't find lbl/os-darwin22.h
configure: WARNING: can't find lbl/os-freebsd13.h
configure: WARNING: can't find lbl/os-linux-gnu.h
configure: WARNING: can't find lbl/os-netbsd9.h
configure: WARNING: can't find lbl/os-openbsd7.h

It is not clear why the os-proto.h symlink management logic is
conditional on the .devel file, but it is clear that nowadays supported
platforms tend not to need a custom header file.  Thus absence of the
file should not generate a warning, also it would be useful to note its
presence.  With this in mind, convert the warning into a template
message:

(config.guess prints "x86_64-pc-linux-gnu" on a Linux PC.)
checking whether to use an os-proto.h header... no

(config.guess prints "sparc-sun-solaris2.10" on a Solaris 10 host.)
checking whether to use an os-proto.h header... yes, at
  "lbl/os-solaris2.h"

aclocal.m4

index 7cca1fde5c5dfd25cd0b6f0befe115558bc02ce3..5dfe6ad4704567ebad2830c56f105be1b3301942 100644 (file)
@@ -840,14 +840,16 @@ AC_DEFUN(AC_LBL_DEVEL,
            # .devel file; why should the ABI for which we produce code
            # depend on .devel?
            #
+           AC_MSG_CHECKING([whether to use an os-proto.h header])
            os=`echo $host_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'`
            name="lbl/os-$os.h"
            if test -f $name ; then
+                   AC_MSG_RESULT([yes, at "$name"])
                    ln -s $name os-proto.h
                    AC_DEFINE(HAVE_OS_PROTO_H, 1,
-                       [if there's an os_proto.h for this platform, to use additional prototypes])
+                       [if there's an os-proto.h for this platform, to use additional prototypes])
            else
-                   AC_MSG_WARN(can't find $name)
+                   AC_MSG_RESULT([no])
            fi
     fi])