s3:configure: "test" only takes one "="
[samba.git] / source3 / configure.in
index 1cf8d9ca4a45d1b73fe750e053b872e977fb7748..b532372bfd624ed0bd038ac82da4229fd65ef40e 100644 (file)
@@ -116,9 +116,10 @@ AC_SUBST(LIBWBCLIENT_SHARED_TARGET)
 AC_SUBST(LIBWBCLIENT_SHARED)
 AC_SUBST(LIBWBCLIENT_STATIC_TARGET)
 AC_SUBST(LIBWBCLIENT_STATIC)
+AC_SUBST(LIBWBCLIENT_TARGET)
 AC_SUBST(LIBWBCLIENT_SOVER)
 AC_SUBST(LIBWBCLIENT)
-AC_SUBST(WINBIND_LIBS)
+AC_SUBST(LIBWBCLIENT_LIBS)
 
 AC_SUBST(LIBSAMBAUTIL_SHARED)
 
@@ -283,7 +284,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
         else
            AC_MSG_CHECKING(GNU ld release version)
            changequote(,)dnl
-           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*[^0-9\.]\+\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
+           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
            ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
            ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
            changequote([,])dnl
@@ -670,6 +671,7 @@ SAVE_CPPFLAGS="${CPPFLAGS}"
 CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
 
 AC_LIBREPLACE_BROKEN_CHECKS
+AC_CHECK_FUNCS([syslog],[],[AC_MSG_ERROR([Required function not found])])
 AC_LIBREPLACE_NETWORK_CHECKS
 
 CPPFLAGS="${SAVE_CPPFLAGS}"
@@ -788,6 +790,7 @@ if test x$enable_cups != xno; then
                        x"$ac_cv_header_cups_language_h" = xyes; then
                        AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
                        samba_cv_HAVE_CUPS=yes
+                       AC_CHECK_LIB_EXT(cups, PRINT_LIBS, httpConnectEncrypt)
                else
                        AC_MSG_WARN([cups-config around but cups-devel not installed])
                        CFLAGS=$ac_save_CFLAGS
@@ -2865,11 +2868,12 @@ AC_ARG_WITH(fake-kaserver,
 if test x"$samba_cv_WITH_AFS" != x"no" ||
    test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
 
+    # see if this box has the OpenSSL DES libraries
+    AC_CHECK_LIB( crypto, DES_pcbc_encrypt, LIBS="$LIBS -lcrypto" , [AC_ERROR(OpenSSL library: libcrypto ot found!)] )
+
     # see if this box has the afs-headers in /usr/include/afs
     AC_MSG_CHECKING(for /usr/include/afs)
     if test -d /usr/include/afs; then
-          CFLAGS="$CFLAGS -I/usr/include/afs"
-          CPPFLAGS="$CPPFLAGS -I/usr/include/afs"
           AC_MSG_RESULT(yes)
     else
       AC_MSG_RESULT(no)
@@ -3919,6 +3923,10 @@ if test x"$with_ads_support" != x"no"; then
 LIBS="$ac_save_LIBS"
 fi
 
+if test x"$use_ads" != xyes; then
+       merged_build_possible=no
+fi
+
 AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache)
 PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS"
 
@@ -5840,8 +5848,8 @@ if test x"$HAVE_WINBIND" = x"no"; then
 fi
 if test x"$HAVE_WBCLIENT" = x"yes"; then
         AC_CHECK_LIB(wbclient, wbcInterfaceDetails,
-                    [WINBIND_LIBS="-lwbclient"], AC_MSG_ERROR([Could not find wbclient]), [$WBCLIENT_LDFLAGS])
-       WINBIND_LIBS="$WINBIND_LIBS $WBCLIENT_LDFLAGS"
+                    [LIBWBCLIENT_LIBS="-lwbclient"], AC_MSG_ERROR([Could not find wbclient]), [$WBCLIENT_LDFLAGS])
+       LIBWBCLIENT_LIBS="$LIBWBCLIENT_LIBS $WBCLIENT_LDFLAGS"
        AC_MSG_RESULT(yes)
        AC_DEFINE(WITH_WINBIND,1,[Whether to link to wbclient])
        EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
@@ -5860,12 +5868,15 @@ else
                ## Only worry about libwbclient if we have shared
                # library support
                LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET
+               LIBWBCLIENT_TARGET=$LIBWBCLIENT_SHARED_TARGET
                LIBWBCLIENT=libwbclient
                INSTALL_LIBWBCLIENT=installlibwbclient
                UNINSTALL_LIBWBCLIENT=uninstalllibwbclient
-               WINBIND_LIBS="-lwbclient"
+               LIBWBCLIENT_LIBS="-lwbclient"
        else
                LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET
+               LIBWBCLIENT_TARGET=$LIBWBCLIENT_STATIC_TARGET
+               LIBWBCLIENT_LIBS=$LIBWBCLIENT_STATIC_TARGET
        fi
 fi
 
@@ -5885,7 +5896,9 @@ else
 fi
 
 AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD="-lpthread"
-                       AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])])
+                       AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])
+                       samba_cv_HAVE_PTHREAD=yes],
+                       samba_cv_HAVE_PTHREAD=no)
 
 AC_SUBST(WINBIND_NSS_PTHREAD)
 AC_SUBST(WINBIND_NSS)
@@ -5976,7 +5989,7 @@ AC_ARG_ENABLE(dnssd,
 [AS_HELP_STRING([--enable-dnssd], [Enable DNS service discovery support (default=no)])])
 
 AC_SUBST(DNSSD_LIBS)
-if test x"$enable_dnssd" == x"yes"; then
+if test x"$enable_dnssd" = x"yes"; then
     have_dnssd_support=yes
 
     AC_CHECK_HEADERS(dns_sd.h)
@@ -6040,6 +6053,20 @@ if test x"$enable_avahi" != x"no"; then
     fi
 fi
 
+#################################################
+# Check if user wants pthreadpool support
+
+AC_ARG_ENABLE(pthreadpool,
+[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=auto)])])
+
+if test x"$enable_pthreadpool" != x"no" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
+    AC_TRY_LINK([#include "pthread.h"],
+    [pthread_create(NULL, NULL, NULL, NULL)],
+                   ,LIBS="$LIBS -lpthread")
+    AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
+    AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o")
+fi
+
 #################################################
 # Check to see if we should use the included iniparser
 
@@ -6356,6 +6383,11 @@ AC_ARG_ENABLE(merged-build,
 [AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], 
 [ enable_merged_build=$enableval ], [ enable_merged_build=auto ])
 
+if test x"$enable_merged_build" = x"yes" -a \
+       x"$merged_build_possible" = x"no" ; then
+       AC_MSG_ERROR(Merged build required but not possible)
+fi
+
 m4_include(../lib/zlib/zlib.m4)
 
 if test x$enable_merged_build = xauto; then