nco icon indicating copy to clipboard operation
nco copied to clipboard

Fails to build with autoconf < 2.70 (error: possibly undefined macro: AC_CHECK_INCLUDES_DEFAULT)

Open sebastic opened this issue 3 years ago • 4 comments

The Debian package build of nco failed because it doesn't have autoconf 2.70 yet:

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'autobld'.
libtoolize: copying file 'autobld/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:213: error: possibly undefined macro: AC_CHECK_INCLUDES_DEFAULT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
dh_autoreconf: error: autoreconf -f -i returned exit code 1
make: *** [debian/rules:10: build] Error 25

sebastic avatar May 15 '21 05:05 sebastic

This patch works for me:

--- a/configure.ac
+++ b/configure.ac
@@ -210,7 +210,6 @@ AC_CHECK_FUNCS([canonicalize_file_name f
 # Check for header files
 # Autoupdate added the next two lines to ensure that your configure
 # script's behavior did not change.  They are probably safe to remove.
-AC_CHECK_INCLUDES_DEFAULT
 AC_PROG_EGREP
 
 AC_CHECK_HEADERS([getopt.h libintl.h limits.h locale.h netinet/in.h stdlib.h string.h strings.h unistd.h])

sebastic avatar May 15 '21 05:05 sebastic

Same solution for Cygwin build

matzeri avatar May 15 '21 17:05 matzeri

@matzeri is this a publicly available Cygwin build with a URL? If so please point me to it and I'll add it to the homepage. @sebastic, I'll put this patch in the next snapshot of upstream sources, thanks!

czender avatar May 15 '21 20:05 czender

I am planning to deploy the 4.9.9 as cygwin package. I proposed the 4.9.8 , but as 4.9.9 just arise I will use that https://sourceware.org/pipermail/cygwin-apps/2021-May/041214.html

build is fine, with static libnco due to the cross link between program and library that is "unsolvable" in Windows. I patched to build on separate tree than source, but testing is a problem, so may be I will revert that idea.

matzeri avatar May 15 '21 21:05 matzeri