mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 07:38:22 +02:00
[configure.in] Support --disable-pthread
Also allows for --enable-pthread=yes which will make configure abort if pthread is not found (as opposed to silently disabling it).
This commit is contained in:
parent
6d01e89988
commit
813cdd7150
1 changed files with 12 additions and 1 deletions
13
configure.in
13
configure.in
|
|
@ -506,8 +506,19 @@ fi
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
|
||||
AC_ARG_ENABLE(pthread,
|
||||
AS_HELP_STRING([--disable-pthread],
|
||||
[Do not use pthread]),
|
||||
[use_pthread=$enableval], [use_pthread=auto])
|
||||
|
||||
have_pthread=no
|
||||
if test "x$use_pthread" != "xno"; then
|
||||
AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PTHREAD, test "x$have_pthread" = "xyes")
|
||||
if test "x$have_pthread" = xno -a "x$use_pthread" = xyes; then
|
||||
AC_MSG_ERROR([pthread requested but not found])
|
||||
fi
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue