]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-threads.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-threads.m4
CommitLineData
ef416fc2 1dnl
2dnl "$Id$"
3dnl
4dnl Threading stuff for the Common UNIX Printing System (CUPS).
5dnl
6dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
7dnl
8dnl These coded instructions, statements, and computer programs are the
9dnl property of Easy Software Products and are protected by Federal
10dnl copyright law. Distribution and use rights are outlined in the file
11dnl "LICENSE.txt" which should have been included with this file. If this
12dnl file is missing or damaged please contact Easy Software Products
13dnl at:
14dnl
15dnl Attn: CUPS Licensing Information
16dnl Easy Software Products
17dnl 44141 Airport View Drive, Suite 204
18dnl Hollywood, Maryland 20636 USA
19dnl
20dnl Voice: (301) 373-9600
21dnl EMail: cups-info@cups.org
22dnl WWW: http://www.cups.org
23dnl
24
25AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support])
26
27have_pthread=no
28
29if 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
46fi
47
48
49dnl
50dnl End of "$Id$".
51dnl