[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] PATCH: Detect SASL library on Solaris



I did a test build of CVS on Solaris and noticed it didn't detect SASL,
even though SASL was available. It turns out the library on SOlaris is
called libsasl.so, instead of libsasl2.so. It is still API compatible
with the Linux one, so there does not seem to be a reason not to use it
So this patch extends the configure test to make this work

Daniel

Index: configure.in
===================================================================
RCS file: /data/cvs/libvirt/configure.in,v
retrieving revision 1.202
diff -u -p -u -p -r1.202 configure.in
--- configure.in	27 Jan 2009 15:29:53 -0000	1.202
+++ configure.in	28 Jan 2009 11:38:25 -0000
@@ -517,18 +517,26 @@ if test "x$with_sasl" != "xno"; then
         fail=1
     fi])
   if test "x$with_sasl" != "xno" ; then
-    AC_CHECK_LIB([sasl2], [sasl_client_init],[with_sasl=yes],[
-      if test "x$with_sasl" = "xcheck" ; then
+    AC_CHECK_LIB([sasl2], [sasl_client_init],[
+      SASL_LIBS="$SASL_LIBS -lsasl2"
+      with_sasl=yes
+    ],[
+      AC_CHECK_LIB([sasl], [sasl_client_init],[
+        SASL_LIBS="$SASL_LIBS -lsasl"
+        with_sasl=yes
+      ],[
+        if test "x$with_sasl" = "xcheck" ; then
           with_sasl=no
-      else
+        else
           fail=1
-      fi])
+        fi
+      ])
+    ])
   fi
   test $fail = 1 &&
     AC_MSG_ERROR([You must install the Cyrus SASL development package in order to compile libvirt])
   CFLAGS="$old_cflags"
   LIBS="$old_libs"
-  SASL_LIBS="$SASL_LIBS -lsasl2"
   if test "x$with_sasl" = "xyes" ; then
     AC_DEFINE_UNQUOTED([HAVE_SASL], 1,
       [whether Cyrus SASL is available for authentication])

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]