Re: [PATCH] Add autoconf tests for pthreads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



david.syzdek@xxxxxxxxxxxxx writes:

> +# Define PTHREAD_LIBS to the linker flag used for Pthread support and define
> +# THREADED_DELTA_SEARCH if Pthreads are available.

This may affect platforms that do have pthread library but choose not to
use threaded delta search for whatever reason by suddenly turning it on.

Which arguably may be a good thing to do, but it is a change unrelated to
porting to FreeBSD.

> +AC_LANG_CONFTEST([AC_LANG_PROGRAM(
> +  [[#include <pthread.h>]],
> +  [[pthread_mutex_t test_mutex;]]
> +)])
> +${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1
> +if test $? -eq 0;then
> + PTHREAD_LIBS="-pthread"
> + THREADED_DELTA_SEARCH=YesPlease
> +else
> + ${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1

Maybe I am old fashioned, but having "-library" very near the beginning of
the command line and naming the final link product (i.e. not with -c) *.o
makes me go "Huh?"  If it were written like this,

	$CC -o conftest$ac_exeext conftest.c -lpthread

it might have been easier to swallow.  I dunno.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux