s3:configure: prevent using external libtalloc with version >= 1.4.0
authorMichael Adam <obnox@samba.org>
Fri, 12 Feb 2010 15:46:33 +0000 (16:46 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 22 Mar 2010 16:48:02 +0000 (17:48 +0100)
There was an ABI change and this results in an error
"undefined symbol: _talloc_free"

Michael

source3/configure.in

index cc90d458b5888992712203ebff5f2265dd33c049..8a1e768d25a31b78ee03e568a224b06166d8f597 100644 (file)
@@ -30,13 +30,29 @@ AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc],
 if test "x$enable_external_libtalloc" != xno
 then
        PKG_CHECK_MODULES(TALLOC, talloc >= 1.3.0, 
-               [ enable_external_libtalloc=yes ],
+               [ found_external_libtalloc=yes ],
                [ if test "x$enable_external_libtalloc" = xyes; then
                        AC_MSG_ERROR([Unable to find libtalloc])
              else 
                        enable_external_libtalloc=no
                  fi
                ])
+
+       TALLOC_LIBS=""
+       TALLOC_CFLAGS=""
+
+       if test "x$found_external_libtalloc" = "xyes"
+       then
+               PKG_CHECK_MODULES(TALLOC, talloc < 1.4.0,
+                       [ enable_external_libtalloc=yes ],
+                       [ if test "x$enable_external_libtalloc" = "xyes" ; then
+                               AC_MSG_ERROR([Unable to find suitable
+                                             libtalloc])
+                       else
+                               enable_external_libtalloc=no
+                       fi
+                       ])
+       fi
 fi
 
 if test "x$enable_external_libtalloc" != xyes