File mc-fix_lib_search_path.patch of Package mc

diff -U 3 -H -b -w -B -E -d -r -N -- mc-4.8.5.orig/m4.include/mc-with-screen-ncurses.m4 mc-4.8.5/m4.include/mc-with-screen-ncurses.m4
--- mc-4.8.5.orig/m4.include/mc-with-screen-ncurses.m4	2012-09-10 15:30:19.000000000 +0400
+++ mc-4.8.5/m4.include/mc-with-screen-ncurses.m4	2012-09-11 19:33:33.598639414 +0400
@@ -9,7 +9,14 @@
     fi
 
     if test x"$ac_ncurses_lib_path" != x; then
+        case $ac_ncurses_lib_path in
+        	/usr/lib*)
+        		ac_ncurses_lib_path=""
+        		;;
+        	*)
         ac_ncurses_lib_path="-L"$ac_ncurses_lib_path
+        		;;
+        esac
     fi
 
     saved_CPPFLAGS="$CPPFLAGS"
@@ -30,9 +37,6 @@
             if test x"$ac_ncurses_inc_path" = x; then
                 ac_ncurses_inc_path="-I/usr/include"
             fi
-            if test x"$ac_ncurses_lib_path" = x; then
-              ac_ncurses_lib_path="-L/usr/lib"
-            fi
             found_ncurses=yes
             AC_DEFINE(HAVE_NCURSES_NCURSES_H, 1,
                       [Define to 1 if you have the <ncurses/ncurses.h> header file.])
diff -U 3 -H -b -w -B -E -d -r -N -- mc-4.8.5.orig/m4.include/mc-with-screen-slang.m4 mc-4.8.5/m4.include/mc-with-screen-slang.m4
--- mc-4.8.5.orig/m4.include/mc-with-screen-slang.m4	2012-09-10 15:30:19.000000000 +0400
+++ mc-4.8.5/m4.include/mc-with-screen-slang.m4	2012-09-11 19:33:33.599639414 +0400
@@ -31,7 +31,14 @@
     fi
 
     if test x"$param_slang_lib_path" != x; then
+        case $ac_ncurses_lib_path in
+        	/usr/lib*)
+        		ac_ncurses_lib_path=""
+        		;;
+        	*)
         ac_slang_lib_path="-L"$param_slang_lib_path
+        		;;
+        esac
     fi
 
     saved_CFLAGS="$CFLAGS"
@@ -51,9 +58,6 @@
 	    if test x"$ac_slang_inc_path" = x; then
 		ac_slang_inc_path="-I/usr/include"
 	    fi
-	    if test x"$ac_slang_lib_path" = x; then
-		ac_slang_lib_path="-L/usr/lib"
-	    fi
 	    found_slang=yes
 	    AC_DEFINE(HAVE_SLANG_H, 1, [Define to use slang.h])
 
@@ -68,9 +72,6 @@
 		if test x"$ac_slang_inc_path" = x; then
 		    ac_slang_inc_path="-I/usr/include"
 		fi
-		if test x"$ac_slang_lib_path" = x; then
-		    ac_slang_lib_path="-L/usr/lib"
-		fi
 		CFLAGS="-DHAVE_SLANG_SLANG_H $CFLAGS"
 	    fi
 	],
openSUSE Build Service is sponsored by