libmicrohttpd ./configure: pthreads not supported (osx)

1k views Asked by At

After downloading and untarballing libmicrohttpd from the GNU archive, I did the usual: ./configure. However, configure stopped reporting an error. Here are the last few relevant lines:

checking for pthread_create in -lpthread... no
checking if compiler supports -pthread... no
checking if compiler supports -pthreads... no
checking if compiler supports -threads... configure: error: Your system is not supporting pthreads!

I searched online, and sure enough, it appears that OSX *does* have pthreads, however I could not find anything on configure reporting errors about no pthreads on OSX.

Here is a top level ls of my /usr/include: http://sprunge.us/DGgY

and here is a tree of the same: http://sprunge.us/fVBV

1

There are 1 answers

0
Paul R On BEST ANSWER

On OS X it's easier to use Homebrew instead of trying to build from scratch - I just checked and they have a formula for libmicrohttpd.

Note that by default Homebrew puts headers and libraries under /usr/local/include and /usr/local/lib - gcc will find libraries and headers here by default, or you can add the paths explicitly if you prefer (-I for include paths, -L for library paths).