diff --git a/configure b/configure index 47d50362327..443a37caa0e 100755 --- a/configure +++ b/configure @@ -15401,6 +15401,12 @@ LIBS=${ac_save_libs} LDFLAGS=${ac_save_ldflags} +if test -n "$PTHREADLIB" ; then + +printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h + +fi + fi # $USE_PTHREAD diff --git a/configure.ac b/configure.ac index e2ccdcc6b96..01d68020d50 100644 --- a/configure.ac +++ b/configure.ac @@ -1902,6 +1902,10 @@ LOC_CHECK_FUNC(pthread_create,POSIX threads functions,PTHREADLIB,,,,,[ LOC_CHECK_LIBS(pthread,pthread_create,POSIX threads,$PTHREADLIBPATH,PTHREADLIB,,,) ]) +if test -n "$PTHREADLIB" ; then + AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if POSIX threads are available.]) +fi + fi # $USE_PTHREAD AC_SUBST(PTHREADINCPATH) diff --git a/include/grass/config.h.in b/include/grass/config.h.in index d7663c6a81d..6508da7b99b 100644 --- a/include/grass/config.h.in +++ b/include/grass/config.h.in @@ -165,6 +165,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PROJ_H +/* Define to 1 if POSIX threads are available. */ +#undef HAVE_PTHREAD + /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H