From d81c2be6e702206b7c00e25be4ee0c0750f1b84d Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Mon, 8 Sep 2014 23:29:40 +0300
Subject: [PATCH 08/17] Reorder libraries in configure script to prevent
 linker errors when linking with libsmbclient

Place libsmbclient before all other libraries to prevent linker errors when linking
with libsmbclient if the libc that is currently used doesn't contain some functions
such as dn_expand (which are often included in libc), but are actually included in
libresolv.
---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ff4022f..079fa27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,7 +1475,7 @@ fi
 # samba
 if test "x$use_samba" != "xno"; then
   PKG_CHECK_MODULES([SAMBA], [smbclient],
-    [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
+    [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$SAMBA_LIBS $LIBS"],
     [AC_CHECK_LIB([smbclient], [main],,
       use_samba=no;AC_MSG_ERROR($missing_library))
       USE_LIBSMBCLIENT=0
-- 
1.7.10.4

