From: Denis Ovsienko Date: Sat, 11 Feb 2023 23:36:14 +0000 (+0000) Subject: Autoconf: Refine reporting of os-proto.h. [skip appveyor] X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/80ec01ab2cf174f0ff7ab0139791c03e2d8b2273 Autoconf: Refine reporting of os-proto.h. [skip appveyor] 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" --- diff --git a/aclocal.m4 b/aclocal.m4 index 7cca1fde..5dfe6ad4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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])