diff options
Diffstat (limited to 'config-scripts')
-rw-r--r-- | config-scripts/cups-ldap.m4 | 50 | ||||
-rw-r--r-- | config-scripts/cups-scripting.m4 | 21 | ||||
-rw-r--r-- | config-scripts/cups-threads.m4 | 32 |
3 files changed, 86 insertions, 17 deletions
diff --git a/config-scripts/cups-ldap.m4 b/config-scripts/cups-ldap.m4 new file mode 100644 index 000000000..3c3e8ed1d --- /dev/null +++ b/config-scripts/cups-ldap.m4 @@ -0,0 +1,50 @@ +dnl +dnl "$Id$" +dnl +dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS). +dnl +dnl Copyright 2003-2006 by Easy Software Products, all rights reserved. +dnl +dnl These coded instructions, statements, and computer programs are the +dnl property of Easy Software Products and are protected by Federal +dnl copyright law. Distribution and use rights are outlined in the file +dnl "LICENSE.txt" which should have been included with this file. If this +dnl file is missing or damaged please contact Easy Software Products +dnl at: +dnl +dnl Attn: CUPS Licensing Information +dnl Easy Software Products +dnl 44141 Airport View Drive, Suite 204 +dnl Hollywood, Maryland 20636 USA +dnl +dnl Voice: (301) 373-9600 +dnl EMail: cups-info@cups.org +dnl WWW: http://www.cups.org/ +dnl + +AC_ARG_ENABLE(ldap, [ --enable-ldap turn on LDAP support, default=yes]) +AC_ARG_WITH(openldap-libs, [ --with-openldap-libs set directory for OpenLDAP library], + LDFLAGS="-L$withval $LDFLAGS" + DSOFLAGS="-L$withval $DSOFLAGS",) +AC_ARG_WITH(openldap-includes, [ --with-openldap-includes + set directory for OpenLDAP includes], + CFLAGS="-I$withval $CFLAGS" + CXXFLAGS="-I$withval $CXXFLAGS" + CPPFLAGS="-I$withval $CPPFLAGS",) + +LIBLDAP="" + +if test x$enable_ldap != xno; then + AC_CHECK_HEADER(ldap.h, + AC_CHECK_LIB(ldap, ldap_value_free, + AC_DEFINE(HAVE_LDAP) + AC_DEFINE(HAVE_OPENLDAP) + LIBLDAP="-lldap")) +fi + +AC_SUBST(LIBLDAP) + + +dnl +dnl End of "$Id$". +dnl diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4 index e0c6832c6..68221a91e 100644 --- a/config-scripts/cups-scripting.m4 +++ b/config-scripts/cups-scripting.m4 @@ -1,9 +1,9 @@ dnl -dnl "$Id: cups-scripting.m4 4494 2005-02-18 02:18:11Z mike $" +dnl "$Id: cups-scripting.m4 5176 2006-02-25 18:14:10Z mike $" dnl dnl Scripting configuration stuff for the Common UNIX Printing System (CUPS). dnl -dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. +dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the dnl property of Easy Software Products and are protected by Federal @@ -66,10 +66,23 @@ fi AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP") -if test "x$CUPS_PHP" != x; then +if test "x$CUPS_PHP" = x; then + CUPS_PHP="no" +else AC_DEFINE(HAVE_PHP) fi +PHPDIR="" +if test "x$CUPS_PHP" != xno; then + AC_PATH_PROG(PHPCONFIG, php-config) + + if test "x$PHPCONFIG" != x; then + PHPDIR="scripting/php" + fi +fi + +AC_SUBST(PHPDIR) + dnl Do we have Python? AC_ARG_WITH(python, [ --with-python set Python interpreter for web interfaces ], CUPS_PYTHON="$withval", @@ -87,5 +100,5 @@ if test "x$CUPS_PYTHON" != x; then fi dnl -dnl End of "$Id: cups-scripting.m4 4494 2005-02-18 02:18:11Z mike $". +dnl End of "$Id: cups-scripting.m4 5176 2006-02-25 18:14:10Z mike $". dnl diff --git a/config-scripts/cups-threads.m4 b/config-scripts/cups-threads.m4 index 788ce838c..639eb7414 100644 --- a/config-scripts/cups-threads.m4 +++ b/config-scripts/cups-threads.m4 @@ -25,26 +25,32 @@ dnl AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support]) have_pthread=no +PTHREAD_FLAGS="" if test "x$enable_threads" != xno; then AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H)) - AC_CHECK_LIB(pthread, pthread_create) - if test "x$ac_cv_lib_pthread_pthread_create" = xyes -a x$ac_cv_header_pthread_h = xyes; then - have_pthread=yes - else - dnl *BSD uses -pthread option... - AC_MSG_CHECKING([for pthread_create using -pthread]) - SAVELIBS="$LIBS" - LIBS="-pthread $LIBS" - AC_TRY_LINK([#include <pthread.h>], - [pthread_create(0, 0, 0, 0);], - have_pthread=yes, - LIBS="$SAVELIBS") - AC_MSG_RESULT([$have_pthread]) + if test x$ac_cv_header_pthread_h = xyes; then + dnl Check various threading options for the platforms we support + for flag in -lpthreads -lpthread -pthread; do + AC_MSG_CHECKING([for pthread_create using $flag]) + SAVELIBS="$LIBS" + LIBS="$flag $LIBS" + AC_TRY_LINK([#include <pthread.h>], + [pthread_create(0, 0, 0, 0);], + have_pthread=yes, + LIBS="$SAVELIBS") + AC_MSG_RESULT([$have_pthread]) + + if test $have_pthread = yes; then + PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT" + break + fi + done fi fi +AC_SUBST(PTHREAD_FLAGS) dnl dnl End of "$Id$". |