Description: Always pass -Wl,-Rxyz rather than just -Rxyz
 gcc used to return 0 on unknown flags, but now returns an error.  So
 test compilations fail because we are passing -R/lib.
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Origin: serge.hallyn@ubuntu.com
Forwarded: no
Last-Update: 2011-06-08

--- ipsec-tools-0.8.0.orig/configure
+++ ipsec-tools-0.8.0/configure
@@ -13076,7 +13076,7 @@ fi
 			as_fn_error $? "ICONV libs or includes not found. Aborting." "$LINENO" 5
 	  	fi
 	fi
-	LIBS="$LIBS -L$libiconv_dir/lib -R$libiconv_dir/lib -liconv"
+	LIBS="$LIBS -L$libiconv_dir/lib -Wl,-R$libiconv_dir/lib -liconv"
 	for ac_func in iconv_open
 do :
   ac_fn_c_check_func "$LINENO" "iconv_open" "ac_cv_func_iconv_open"
@@ -13333,7 +13333,7 @@ fi
 
 $as_echo "#define HAVE_LIBRADIUS /**/" >>confdefs.h
 
-	LIBS="$LIBS -L$libradius_dir/lib -R$libradius_dir/lib -lradius"
+	LIBS="$LIBS -L$libradius_dir/lib -Wl,-R$libradius_dir/lib -lradius"
 	for ac_func in rad_create_request
 do :
   ac_fn_c_check_func "$LINENO" "rad_create_request" "ac_cv_func_rad_create_request"
@@ -13536,7 +13536,7 @@ fi
 
 $as_echo "#define HAVE_LIBPAM /**/" >>confdefs.h
 
-	LIBS="$LIBS -L$libpam_dir/lib -R$libpam_dir/lib -lpam"
+	LIBS="$LIBS -L$libpam_dir/lib -Wl,-R$libpam_dir/lib -lpam"
 	for ac_func in pam_start
 do :
   ac_fn_c_check_func "$LINENO" "pam_start" "ac_cv_func_pam_start"
@@ -13739,7 +13739,7 @@ fi
 
 $as_echo "#define HAVE_LIBLDAP /**/" >>confdefs.h
 
-	LIBS="$LIBS -L$libldap_dir/lib -R$libldap_dir/lib -lldap"
+	LIBS="$LIBS -L$libldap_dir/lib -Wl,-R$libldap_dir/lib -lldap"
 
 	saved_CFLAGS=$CFLAGS
 	CFLAGS="$CFLAGS -Wall -Werror"
