Mercurial > libpst
diff configure.ac @ 393:ffbb5e3f2551
Add missing linking with zlib and libpthread/librt
The uncompress and sem_* functions are used by various parts of the code
but the files built from that code were not linked with zlib/pthread/rt.
This fixes building with the --no-add-needed linker option.
Fixes: https://bugs.debian.org/604796
author | Paul Wise <pabs3@bonedaddy.net> |
---|---|
date | Mon, 23 Dec 2019 12:23:22 +0800 |
parents | 54465fca8b9e |
children | 3cbda103e0ef |
line wrap: on
line diff
--- a/configure.ac Mon Dec 23 12:23:22 2019 +0800 +++ b/configure.ac Mon Dec 23 12:23:22 2019 +0800 @@ -173,7 +173,10 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h inttypes.h limits.h regex.h semaphore.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/param.h sys/shm.h sys/stat.h sys/types.h time.h unistd.h wchar.h]) -AC_SEARCH_LIBS([sem_init],[pthread rt]) +save_libs="$LIBS" ; LIBS="" +AC_SEARCH_LIBS([sem_init], [pthread rt], [SEM_LIBS="$LIBS"], [AC_MSG_ERROR([sem_init missing])]) +AC_SUBST([SEM_LIBS]) +LIBS="$save_libs" # Checks for typedefs, structures, and compiler characteristics.