Remove --ldap-base from the python provision script
[samba.git] / source4 / aclocal.m4
index f5437e6683ba0946c1921c9da1d3892bdb0ba80e..57a66439a17af64ed02d84b8ba54e90bd58c243c 100644 (file)
@@ -22,19 +22,38 @@ AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[
   $1=[$]ac_new_flags
 ])
     
-dnl Removes -L/usr/lib/? from given variable
+dnl Removes '-L/usr/lib[/]', '-Wl,-rpath,/usr/lib[/]'
+dnl and '-Wl,-rpath -Wl,/usr/lib[/]' from given variable
 AC_DEFUN(LIB_REMOVE_USR_LIB,[
   ac_new_flags=""
+  l=""
   for i in [$]$1; do
-    case [$]i in
-    -L/usr/lib|-L/usr/lib/) ;;
-    *) ac_new_flags="[$]ac_new_flags [$]i" ;;
+    case [$]l[$]i in
+    -L/usr/lib) ;;
+    -L/usr/lib/) ;;
+    -Wl,-rpath,/usr/lib) ;;
+    -Wl,-rpath,/usr/lib/) ;;
+    -Wl,-rpath) l=[$]i;;
+    -Wl,-rpath-Wl,/usr/lib) l="";;
+    -Wl,-rpath-Wl,/usr/lib/) l="";;
+    *)
+       s=" "
+        if test x"[$]ac_new_flags" = x""; then
+            s="";
+       fi
+        if test x"[$]l" = x""; then
+            ac_new_flags="[$]ac_new_flags[$]s[$]i";
+        else
+            ac_new_flags="[$]ac_new_flags[$]s[$]l [$]i";
+        fi
+        l=""
+        ;;
     esac
   done
   $1=[$]ac_new_flags
 ])
 
-m4_include(lib/replace/libreplace_macros.m4)
+m4_include(lib/replace/libreplace.m4)
 m4_include(build/m4/ax_cflags_gcc_option.m4)
 m4_include(build/m4/ax_cflags_irix_option.m4)
 m4_include(build/m4/public.m4)