Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | This patch fixes a case where it find crypt defined in libc (musl) but |
| 2 | not in specified libraries then it ends up assigning |
| 3 | |
| 4 | LIBCRYPT="-l" which then goes into makefile cause all sort of problems |
| 5 | e.g. |
| 6 | |
| 7 | ld: cannot find -l-m32 |
| 8 | | collect2: error: ld returned 1 exit status |
| 9 | |
| 10 | The reason is that -l appears on commandline with out any library and |
| 11 | compiler treats the next argument as library name whatever it is. |
| 12 | |
| 13 | |
| 14 | Upstream-Status: Pending |
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 16 | |
| 17 | Index: Linux-PAM-1.1.6/configure.in |
| 18 | =================================================================== |
| 19 | --- Linux-PAM-1.1.6.org/configure.ac |
| 20 | +++ Linux-PAM-1.1.6/configure.ac |
| 21 | @@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = |
| 22 | [crypt_libs="crypt"]) |
| 23 | |
| 24 | BACKUP_LIBS=$LIBS |
| 25 | -AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") |
| 26 | +AC_SEARCH_LIBS([crypt],[$crypt_libs], |
| 27 | + [test "$ac_cv_search_crypt" = "none required" || |
| 28 | + LIBCRYPT="$ac_cv_search_crypt"]) |
| 29 | AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) |
| 30 | LIBS=$BACKUP_LIBS |
| 31 | AC_SUBST(LIBCRYPT) |