On any reasonable modern toolchain.. you only need to AC_SEARCH_LIBS([gethostbyname], [nsl]) to get the correct library, nsl is for solaris that needed it.
Since you are targeting linux then nothing is needed.. something's wrong with autoconf tests, On Wed, Jan 5, 2022 at 4:25 PM Satadru Pramanik via curl-library <curl-library@lists.haxx.se> wrote: > > I get this error on both armv7l & i686 trying to run the configure script on > ChromeOS inside Chromebrew with GCC 11.2. > The configure script from curl 7.80.0 works. > > checking if X/Open network library is required... no > checking for gethostbyname... no > checking for gethostbyname in -lnsl... no > checking for gethostbyname in -lsocket... no > checking for gethostbyname in -lwatt... no > checking for gethostbyname with both nsl and socket libs... no > checking for gethostbyname for Minix 3... no > checking for gethostbyname for eCos... no > checking for gethostbyname for AmigaOS bsdsocket.library... no > checking for gethostbyname in -lnetwork... no > checking for gethostbyname in -lnet... no > configure: error: couldn't find libraries for gethostbyname() > > on x86_64 it succeeds though: > checking if X/Open network library is required... no > checking for gethostbyname... yes > > on i686 and armv7l I see this in config.log from the 7.81.0 configure script: > configure:21721: checking for gethostbyname > configure:21721: i686-cros-linux-gnu-gcc -o conftest -O2 -pipe -flto > -ffat-lto-objects -fPIC -fuse-ld=gold -flto conftest.c >&5 > /usr/local/libexec/gcc/i686-cros-linux-gnu/11/cc1: error while loading shared > libraries: libisl.so.23: cannot open shared object file: No such file or > directory > as: error while loading shared libraries: libopcodes-2.37.so: cannot open > shared object file: No such file or directory > configure:21721: $? = 1 > configure: failed program was: > ... > configure:21721: result: no > > > on i686 I see this in config.log from the 7.80.0 configure script: > configure:21675: result: no > configure:21679: checking for gethostbyname > configure:21679: i686-cros-linux-gnu-gcc -o conftest -O2 -pipe -flto > -ffat-lto-objects -fPIC -fuse-ld=gold -Werror-implicit-function-declaration > -Wno-system-headers -Wenum-conversion -flto conftest.c >&5 > configure:21679: $? = 0 > configure:21679: result: yes > > Looks like some sort of LIBRARY_PATH issue in the 7.81.0 configure script? > > FYI, autoreconf -fi also gives a broken configure script. > > Thanks, > > Satadru Pramanik > Chromebrew dev team > -- > Unsubscribe: https://lists.haxx.se/listinfo/curl-library > Etiquette: https://curl.haxx.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html