mainAutoconf - Support: sr #110990, AS_IF / AC_CHECK_LIB generates...

 
 

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

Submitter:  Sergei Trofimovich <slyfox>
Submitted:  Sat 23 Dec 2023 06:24:04 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 Dec 2023 08:18:43 PM UTC, comment #3: 

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

Sergei Trofimovich <slyfox>
Sat 23 Dec 2023 06:50:04 PM UTC, comment #2: 

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

Sergei Trofimovich <slyfox>
Sat 23 Dec 2023 06:40:50 PM UTC, comment #1: 

Does quoting the 2nd argument help?

Anonymous
Sat 23 Dec 2023 06:24:04 PM UTC, original submission:  

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: ` ;;'


Sergei Trofimovich <slyfox>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by slyfox (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code