s3:winbind: The get[gr|pw]end functions need access to the client state
[metze/samba/wip.git] / source3 / configure.in
index a1388fdff12e3a9181e4b770e42edb1dc993e196..749bfc40fdb69f10f9241be0a83a4ee24beb9bbd 100644 (file)
@@ -137,7 +137,7 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then
            int main(void)
            {
                return 0;
-           }],[-Wdeclaration-after-statement],[$CPPFLAGS],[$LDFLAGS],
+           }],[$CFLAGS -Wdeclaration-after-statement],[$CPPFLAGS],[$LDFLAGS],
            samba_cv_HAVE_Wdeclaration_after_statement=yes,
            samba_cv_HAVE_Wdeclaration_after_statement=no,
            samba_cv_HAVE_Wdeclaration_after_statement=cross)
@@ -155,7 +155,7 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then
            int main(void)
            {
                return 0;
-           }],[-Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS],
+           }],[$CFLAGS -Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS],
            samba_cv_HAVE_Werror_implicit_function_declaration=yes,
            samba_cv_HAVE_Werror_implicit_function_declaration=no,
            samba_cv_HAVE_Werror_implicit_function_declaration=cross)
@@ -269,7 +269,7 @@ AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [
   int main(void)
   {
        return 0;
-  }],[-Werror],[$CPPFLAGS],[$LDFLAGS],
+  }],[$CFLAGS -Werror],[$CPPFLAGS],[$LDFLAGS],
   samba_cv_HAVE_Werror=yes,samba_cv_HAVE_Werror=no,samba_cv_HAVE_Werror=cross)])
 if test x"$samba_cv_HAVE_Werror" = x"yes"; then
    Werror_FLAGS="-Werror"
@@ -280,7 +280,7 @@ AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [
   int main(void)
   {
        return 0;
-  }],[-w2],[$CPPFLAGS],[$LDFLAGS],
+  }],[$CFLAGS -w2],[$CPPFLAGS],[$LDFLAGS],
   samba_cv_HAVE_w2=yes,samba_cv_HAVE_w2=no,samba_cv_HAVE_w2=cross)])
 if test x"$samba_cv_HAVE_w2" = x"yes"; then
    Werror_FLAGS="-w2"
@@ -291,7 +291,7 @@ AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn,
    int main(void)
    {
        return 0;
-   }],[-errwarn=%all],[$CPPFLAGS],[$LDFLAGS],
+   }],[$CFLAGS -errwarn=%all],[$CPPFLAGS],[$LDFLAGS],
    samba_cv_HAVE_errwarn=yes,samba_cv_HAVE_errwarn=no,samba_cv_HAVE_errwarn=cross)])
 if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
    Werror_FLAGS="-errwarn=%all"
@@ -622,6 +622,10 @@ exit(1);
         fi
       AC_MSG_RESULT([$GLIBC_LFS_SUPPORT])
     ;;
+    *qnx*)
+        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
+        AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
+        ;;
 
 esac
 
@@ -1014,6 +1018,7 @@ AC_CHECK_HEADERS(sys/mman.h)
 # setbuffer, shmget, shm_open are needed for smbtorture
 AC_CHECK_FUNCS(shmget shm_open)
 AC_CHECK_FUNCS(gettext dgettext)
+AC_CHECK_FUNCS(bindtextdomain textdomain)
 
 # Find a method of generating a stack trace
 AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h)
@@ -3753,7 +3758,7 @@ if test x"$with_ads_support" != x"no"; then
                        if (str) free (str); 
                        return 0;
                }
-               ],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+               ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
                smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes,
                smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=no)])
 
@@ -3771,7 +3776,7 @@ if test x"$with_ads_support" != x"no"; then
                        krb5_enctype_to_string(1, buf, 256);
                        return 0;
                }
-               ],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+               ],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
                smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes,
                smb_krb5_cv_enctype_to_string_takes_size_t_arg=no)])
 
@@ -4463,7 +4468,7 @@ AC_TRY_RUN_STRICT([
 #define HAVE_QUOTACTL_4A 1
 #define AUTOCONF_TEST 1
 #include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
            samba_cv_HAVE_QUOTACTL_4A=yes,samba_cv_HAVE_QUOTACTL_4A=no,samba_cv_HAVE_QUOTACTL_4A=cross)])
 if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then
     samba_cv_SYSQUOTA_FOUND=yes;
@@ -4478,7 +4483,7 @@ AC_TRY_RUN_STRICT([
 #define HAVE_QUOTACTL_4B 1
 #define AUTOCONF_TEST 1
 #include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
            samba_cv_HAVE_QUOTACTL_4B=yes,samba_cv_HAVE_QUOTACTL_4B=no,samba_cv_HAVE_QUOTACTL_4B=cross)])
 if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then
     echo "int quotactl(const char *path, int cmd, int id, char *addr) is not reworked for the new sys_quota api"
@@ -4494,7 +4499,7 @@ AC_TRY_RUN_STRICT([
 #define HAVE_QUOTACTL_3 1
 #define AUTOCONF_TEST 1
 #include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
            samba_cv_HAVE_QUOTACTL_3=yes,samba_cv_HAVE_QUOTACTL_3=no,samba_cv_HAVE_QUOTACTL_3=cross)])
 if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then
     echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api"
@@ -4737,7 +4742,7 @@ AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc],
 
 if test "x$enable_external_libtalloc" != xno
 then
-       PKG_CHECK_MODULES(LIBTALLOC, talloc >= 2.0.0, 
+       PKG_CHECK_MODULES(LIBTALLOC, talloc >= 1.4.0, 
                [ enable_external_libtalloc=yes ],
                [ if test x$enable_external_libtalloc = xyes; then
                        AC_MSG_ERROR([Unable to find libtalloc])
@@ -6158,7 +6163,7 @@ if test x"$enable_avahi" != x"no"; then
     LIBS="$save_LIBS"
 
     if test x"$ac_cv_lib_ext_avahi_client_avahi_client_new" != x"yes" -o \
-       test x"$ac_cv_lib_ext_avahi_common_avahi_strerror" != x"yes" ; then
+       x"$ac_cv_lib_ext_avahi_common_avahi_strerror" != x"yes" ; then
        have_avahi_support=no
     fi