Mohammad Akhlaghi wrote: > To avoid similar situations in the future, it may be good to add a check > in the `configure' script so if `getgroups' fails, but the system is a > GNU system, the configure script crashes with a warning (after all > `make' will crash, but a crash in `configure' is more clear than a crash > in `make'). Of course, this test can be done with all components similar > to `getgroups' through a single macro/function.
We have such a check already in every configure script. It's the checking whether the C compiler works check, which catches 90% of the wrong combinations of CFLAGS, LDFLAGS, and such. In this case, this check succeeded, and it was only later during configuration that the checking for library containing wcspih check found -lwcs. It is be possible to search libraries using AC_RUN_IFELSE instead of AC_LINK_IFELSE, and add -rpath options as needed. The AC_LIB_LINKFLAGS macro from gnulib does this. It appears that you used the stock Autoconf macro, which does not do this. Bruno