Module Name: othersrc Committed By: lukem Date: Sun Sep 24 02:07:12 UTC 2023
Modified Files: othersrc/libexec/tnftpd: configure.ac Log Message: configure: improve check for inet_net_pton() Look for inet_net_pton() in -lresolv (for glibc). Move library checks after header checks, in case latter are needed for former. Display vars at end of configure: CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 othersrc/libexec/tnftpd/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/libexec/tnftpd/configure.ac diff -u othersrc/libexec/tnftpd/configure.ac:1.52 othersrc/libexec/tnftpd/configure.ac:1.53 --- othersrc/libexec/tnftpd/configure.ac:1.52 Sat Sep 23 04:45:03 2023 +++ othersrc/libexec/tnftpd/configure.ac Sun Sep 24 02:07:11 2023 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.52 2023/09/23 04:45:03 lukem Exp $ +# $NetBSD: configure.ac,v 1.53 2023/09/24 02:07:11 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -139,23 +139,6 @@ AS_CASE([$target_os], ) # -# Checks for libraries. -# -AC_SEARCH_LIBS([crypt], [crypt]) -AC_SEARCH_LIBS([pidfile], [util]) -AC_SEARCH_LIBS([setproctitle], [util]) - -AC_SEARCH_LIBS([gethostbyname], [nsl]) -AC_SEARCH_LIBS([socket], - [socket], - [], - [AC_CHECK_LIB([socket], - [socket], - [LIBS="-lsocket -lnsl $LIBS"], - [], - [-lnsl])]) - -# # Checks for header files. # accheck_includes=' @@ -236,6 +219,26 @@ AC_CHECK_HEADERS([sys/resource.h \ [], [], [$accheck_includes]) # +# Checks for libraries with specific functions. +# +AC_SEARCH_LIBS([crypt], [crypt]) +AC_SEARCH_LIBS([pidfile], [util]) +AC_SEARCH_LIBS([setproctitle], [util]) + +AC_SEARCH_LIBS([gethostbyname], [nsl]) +AC_SEARCH_LIBS([socket], + [socket], + [], + [AC_CHECK_LIB([socket], + [socket], + [LIBS="-lsocket -lnsl $LIBS"], + [], + [-lnsl])]) + +AC_SEARCH_LIBS([inet_net_pton], [resolv], [], [AC_LIBOBJ([inet_net_pton])]) +AC_CHECK_FUNCS([inet_net_pton]) + +# # Checks for typedefs, structures, and compiler characteristics. # AC_CHECK_DECLS([AI_NUMERICHOST, FNM_CASEFOLD, @@ -286,7 +289,7 @@ AC_FUNC_FSEEKO() AC_FUNC_STRCOLL() AC_REPLACE_FUNCS([daemon err explicit_memset fgetln fparseln \ getaddrinfo getgrouplist getnameinfo getusershell \ - inet_net_pton inet_ntop inet_pton mkstemp \ + inet_ntop inet_pton mkstemp \ setprogname sl_init snprintf strdup strerror strsuftollx \ strlcat strlcpy strsep usleep]) AC_CHECK_FUNCS([dirfd getcwd gethostbyaddr gethostbyname gethostbyname2 \ @@ -294,6 +297,7 @@ AC_CHECK_FUNCS([dirfd getcwd gethostbyad isascii madvise memmove memset mmap pidfile realpath \ select setlogin setproctitle setegid seteuid \ setresgid setresuid strcasecmp strtol strtoul vfork]) + AS_IF([test "$ac_cv_func_dirfd" = no], [AC_MSG_CHECKING([whether dirfd() is a macro]) AC_EGREP_CPP([have_dirfd_as_macro], [ @@ -530,6 +534,11 @@ AC_OUTPUT() AC_MSG_NOTICE([ === Configuration results ===]) AC_MSG_NOTICE([Package: $PACKAGE_STRING]) AC_MSG_NOTICE([Prefix: $prefix]) +AC_MSG_NOTICE([CC $CC]) +AC_MSG_NOTICE([CFLAGS $CFLAGS]) +AC_MSG_NOTICE([CPPFLAGS $CPPFLAGS]) +AC_MSG_NOTICE([LDFLAGS $LDFLAGS]) +AC_MSG_NOTICE([LIBS $LIBS]) AC_MSG_NOTICE([--enable-builtinls $opt_builtinls]) AC_MSG_NOTICE([--enable-ipv6 $opt_ipv6]) AC_MSG_NOTICE([--with-blocklist $with_blocklist])