[Bf-committers] Autodetect -lpthread & "cc -pthread"

LarstiQ bf-committers@blender.org
Sat, 28 Dec 2002 18:04:29 +0100


On Sat, Dec 28, 2002 at 02:10:48AM +0100, Bert Driehuis wrote:
> The attached snippet of M4 code automagically detects how to build with
> pthreads (tested by me on FreeBSD, and tested by a third party on
> Solaris). It can be hooked up by adding
> 	AC_CHECK_PTHREAD
> to configure.ac.
> 
> The only snag is: our aclocal.m4 seems to be autogenerated by
> ./bootstrap. I'm not sufficiently automake savvy to know how to properly
> hook this up.
> 
> Anyone who can enlighten me?

aclocal.m4 is generated by the aclocal invocation in bootstrap,
according to my aclocal manpage it scans all the .m4s it can find, the
contents of acinclude.m4 are also automatically included into aclocal.m4

doc/autoconfig.txt advises to copy acinclude.m4 to the blender dir in
case one has problems with AC_PROG_LIBTOOL (which I did have on OSX),
but I believe that should be done by aclocal itself.

I have seen acinclude.m4 in other projects where they define their own
M4 macros, I believe that file to be the right place for our own macros
also.

I don't know anything about pthread checks, but if it works :)

> Cheers,
> 
> 				-- Bert

Hope this helps,
LarstiQ