[sr #110990] AS_IF / AC_CHECK_LIB generates invalid shell on editline-1.17.1

2023-12-23 Thread Sergei Trofimovich
Follow-up Comment #3, sr#110990 (group autoconf):

Proposed `editline` change to adapt to `autoconf-2.72` as
https://github.com/troglobit/editline/pull/64


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #110990] AS_IF / AC_CHECK_LIB generates invalid shell on editline-1.17.1

2023-12-23 Thread Sergei Trofimovich
Follow-up Comment #2, sr#110990 (group autoconf):

Yeah, adding extra quotes around the second argument of `AS_IF()` does work.
Thank you!


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #110990] AS_IF / AC_CHECK_LIB generates invalid shell on editline-1.17.1

2023-12-23 Thread anonymous
Follow-up Comment #1, sr#110990 (group autoconf):

Does quoting the 2nd argument help?


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #110990] AS_IF / AC_CHECK_LIB generates invalid shell on editline-1.17.1

2023-12-23 Thread Sergei Trofimovich
URL:
  

 Summary: AS_IF / AC_CHECK_LIB generates invalid shell on
editline-1.17.1
   Group: Autoconf
   Submitter: slyfox
   Submitted: Sat 23 Dec 2023 06:24:04 PM UTC
Priority: 5 - Unprioritized
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
Operating System: GNU/Linux


___

Follow-up Comments:


---
Date: Sat 23 Dec 2023 06:24:04 PM UTC By: Sergei Trofimovich 
Noticed seeming autoconf-2.72 regression when was building
https://github.com/troglobit/editline/blob/master/configure.ac#L92 in
`nixpkgs`.

Complete reproducer:


dnl cat configure.ac
AC_INIT(editline, 1.17.1, https://github.com/troglobit/editline/issues)

AC_CONFIG_SRCDIR([a.c])

AC_PROG_CC

AC_ARG_ENABLE(termcap,
   AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal
size.]))

# Check for a termcap compatible library if enabled
AS_IF([test "x$enable_termcap" = "xyes"],
   AC_CHECK_LIB(terminfo, tgetent, , [
  AC_CHECK_LIB(termcap, tgetent, , [
 AC_CHECK_LIB(tinfo, tgetent, , [
AC_CHECK_LIB(curses, tgetent, , [
   AC_CHECK_LIB(ncurses, tgetent, , [
  AC_MSG_ERROR([Cannot find a termcap capable library, try
installing Ncurses.])])
   ])
])
 ])
  ])
)

# Generate all files
AC_OUTPUT


Triggering:


$ autoreconf -ifv && touch a.c && ./configure

autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running:
/nix/store/78q16yv4zyrary0xw9m6q1yi8i9h33bl-autoconf-2.72/bin/autoconf
--force
autoreconf: configure.ac: not using Autoheader
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory '.'
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
./configure: line 3476: syntax error near unexpected token `;;'
./configure: line 3476: ` ;;'









___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/