libgpm fails to link via -lgpm
I am the author of an application that uses libgpm and my configure script cannot locate it, nor can it link. (Likely configure fails to find it because it cannot link, so just one root cause.)
I started with a fresh VM using alpine-virt-3.14.2, then switched to edge 3.15.0_alpha20210804, and installed these packages:
ncurses ncurses-dev gpm musl-dev gpm-dev autoconf automake make gcc
My configure.ac detects gpm via:
AC_CHECK_LIB([gpm], [Gpm_Open], Q_HAS_LIBGPM="yes", Q_HAS_LIBGPM="no")
If I modify my configure.ac to use gpm anyway without the check, the C files compile fine (they can see the gpm.h) but then it fails to link:
gcc -g -O2 -DQ_NO_NEWTERM -DQ_ENABLE_GPM -o lcxterm source/codepage.o source/colors.o source/common.o source/console.o source/emulation.o source/field.o source/forms.o source/input.o source/kermit.o source/keyboard.o source/main.o source/options.o source/protocols.o source/screen.o source/scrollback.o source/shell.o source/states.o source/vt100.o source/xmodem.o source/zmodem.o -lncursesw -lgpm
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpm
collect2: error: ld returned 1 exit status
I am very new to Alpine, so apologies and hopefully this is a trivial thing I did not do on my end.