]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | dnl |
2 | dnl "$Id$" | |
3 | dnl | |
4 | dnl Threading stuff for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
6 | dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. | |
7 | dnl | |
8 | dnl These coded instructions, statements, and computer programs are the | |
9 | dnl property of Easy Software Products and are protected by Federal | |
10 | dnl copyright law. Distribution and use rights are outlined in the file | |
11 | dnl "LICENSE.txt" which should have been included with this file. If this | |
12 | dnl file is missing or damaged please contact Easy Software Products | |
13 | dnl at: | |
14 | dnl | |
15 | dnl Attn: CUPS Licensing Information | |
16 | dnl Easy Software Products | |
17 | dnl 44141 Airport View Drive, Suite 204 | |
18 | dnl Hollywood, Maryland 20636 USA | |
19 | dnl | |
20 | dnl Voice: (301) 373-9600 | |
21 | dnl EMail: cups-info@cups.org | |
22 | dnl WWW: http://www.cups.org | |
23 | dnl | |
24 | ||
25 | AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support]) | |
26 | ||
27 | have_pthread=no | |
28 | ||
29 | if test "x$enable_threads" != xno; then | |
30 | AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H)) | |
31 | AC_CHECK_LIB(pthread, pthread_create) | |
32 | ||
33 | if test "x$ac_cv_lib_pthread_pthread_create" = xyes -a x$ac_cv_header_pthread_h = xyes; then | |
34 | have_pthread=yes | |
35 | else | |
36 | dnl *BSD uses -pthread option... | |
37 | AC_MSG_CHECKING([for pthread_create using -pthread]) | |
38 | SAVELIBS="$LIBS" | |
39 | LIBS="-pthread $LIBS" | |
40 | AC_TRY_LINK([#include <pthread.h>], | |
41 | [pthread_create(0, 0, 0, 0);], | |
42 | have_pthread=yes, | |
43 | LIBS="$SAVELIBS") | |
44 | AC_MSG_RESULT([$have_pthread]) | |
45 | fi | |
46 | fi | |
47 | ||
48 | ||
49 | dnl | |
50 | dnl End of "$Id$". | |
51 | dnl |