https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124512
--- Comment #23 from Christopher Albert <albert at tugraz dot at> --- (In reply to Patrick Welche from comment #22) > Just compiled 569ace1fa50f759 successfully with the "proposed patch". > > Slightly suprised at the complicated solution given that, as hinted > in the original bug report, AC_CHECK_FUNCS should do the trick: > > $ cat configure.ac > AC_INIT > AC_LANG(C) > AC_CHECK_LIB(pthread, pthread_mutexattr_init) > AC_CHECK_FUNCS(pthread_mutexattr_setpshared pthread_condattr_setpshared) > $ ./configure > 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 > checking for pthread_mutexattr_init in -lpthread... yes > checking for pthread_mutexattr_setpshared... no > checking for pthread_condattr_setpshared... no > > > Anyway, the build problem is solved. There still seems to be some > lingering doubt as to whether or not process-shared pthreads are > actually needed. Thanks for the remark. For the immediate NetBSD build failure, AC_CHECK_FUNCS would probably be sufficient. Here a single probe is used to gate caf_shmem on the interface it actually needs as a unit: pthread_mutexattr_setpshared, pthread_condattr_setpshared, and PTHREAD_PROCESS_SHARED, under the flags selected by AX_PTHREAD.
