The solaris linker seems to require an extra mention of dependent libs
authorVolker Lendecke <vl@samba.org>
Fri, 26 Jun 2009 19:52:34 +0000 (21:52 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 26 Jun 2009 21:15:51 +0000 (23:15 +0200)
source3/configure.in

index 82a83a3e06df6f277e232d4b9936d704c1ce31cc..d8ca0a72a3bb4ec30cd4ff73f08778e14f77ec7c 100644 (file)
@@ -6068,7 +6068,6 @@ fi
 AC_ARG_ENABLE(avahi,
 [AS_HELP_STRING([--enable-avahi], [Enable Avahi support (default=auto)])])
 
-AC_SUBST(AVAHI_LIBS)
 if test x"$enable_avahi" != x"no"; then
     have_avahi_support=yes
 
@@ -6082,12 +6081,18 @@ if test x"$enable_avahi" != x"no"; then
        have_avahi_support=no
     fi
 
-    AC_CHECK_LIB_EXT(avahi-client, AVAHI_LIBS, avahi_client_new)
-    if test x"$ac_cv_lib_ext_avahi_client_avahi_client_new" != x"yes"; then
+    save_LIBS="$LIBS"
+    AC_CHECK_LIB(avahi-client, avahi_client_new)
+    AC_CHECK_LIB(avahi-common, avahi_strerror)
+    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
        have_avahi_support=no
     fi
 
     if test x"$have_avahi_support" = x"yes"; then
+        AC_SUBST(AVAHI_LIBS, "-lavahi-client -lavahi-common")
        AC_DEFINE(WITH_AVAHI_SUPPORT, 1,
                [Whether to enable avahi support])
        AC_SUBST(AVAHI_OBJ, "lib/avahi.o smbd/avahi_register.o")