From d4596baed48b983c881c64edc65b6fe5336f1d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 29 May 2019 11:19:34 +0200 Subject: [PATCH] Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make --- config.h.in | 3 --- configure | 11 +++++++++++ configure.ac | 8 ++++++++ lib/dns/Makefile.in | 3 --- make/rules.in | 4 ++++ 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/config.h.in b/config.h.in index 31307cb186..7f6a66c503 100644 --- a/config.h.in +++ b/config.h.in @@ -363,9 +363,6 @@ /* Define to 1 if you have the `setresuid' function. */ #undef HAVE_SETRESUID -/* Define to 1 if you have the `sigwait' function. */ -#undef HAVE_SIGWAIT - /* define if struct stat has st_mtim.tv_nsec field */ #undef HAVE_STAT_NSEC diff --git a/configure b/configure index 0db42c485e..884e9edd39 100755 --- a/configure +++ b/configure @@ -804,6 +804,9 @@ FGREP SED LIBTOOL SET_MAKE +LFS_LIBS +LFS_LDFLAGS +LFS_CFLAGS EGREP GREP CPP @@ -4171,6 +4174,14 @@ $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi +LFS_CFLAGS=`getconf LFS_CFLAGS 2>/dev/null` +LFS_LDFLAGS=`getconf LFS_LDFLAGS 2>/dev/null` +LFS_LIBS=`getconf LFS_LIBS 2>/dev/null` + + + + + # Enable RFC 3542 APIs on macOS $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index b2599e0a23..d56f72890b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,14 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_FSEEKO +LFS_CFLAGS=`getconf LFS_CFLAGS 2>/dev/null` +LFS_LDFLAGS=`getconf LFS_LDFLAGS 2>/dev/null` +LFS_LIBS=`getconf LFS_LIBS 2>/dev/null` + +AC_SUBST([LFS_CFLAGS]) +AC_SUBST([LFS_LDFLAGS]) +AC_SUBST([LFS_LIBS]) + # Enable RFC 3542 APIs on macOS AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Select RFC3542 IPv6 API on macOS]) diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in index b7693f0921..4cc8a47276 100644 --- a/lib/dns/Makefile.in +++ b/lib/dns/Makefile.in @@ -167,9 +167,6 @@ include/dns/rdatastruct.h: gen \ code.h: gen ./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; } -gen: LFS_CFLAGS = `getconf LFS_CFLAGS 2>/dev/null` -gen: LFS_LDFLAGS = `getconf LFS_LDFLAGS 2>/dev/null` -gen: LFS_LIBS = `getconf LFS_LIBS 2>/dev/null` gen: gen.c ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ ${LFS_CFLAGS} ${LFS_LDFLAGS} \ diff --git a/make/rules.in b/make/rules.in index 6ecc5179ae..03e1fde18a 100644 --- a/make/rules.in +++ b/make/rules.in @@ -116,6 +116,10 @@ BUILD_CPPFLAGS = @BUILD_CPPFLAGS@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ BUILD_LIBS = @BUILD_LIBS@ +LFS_CFLAGS = @LFS_CFLAGS@ +LFS_LDFLAGS = @LFS_LDFLAGS@ +LFS_LIBS = @LFS_LIBS@ + .SUFFIXES: .SUFFIXES: .c .@O@