Skip to content
Snippets Groups Projects
Commit 996bd23f authored by Peter Trommler's avatar Peter Trommler :drum: Committed by Austin Seipp
Browse files

Fix library detection of shm* on openSUSE (#8350)


Use the new AC_SERACH_LIBS to check if rt is needed for shm_open
and shm_unlink. This sets LIBS and so the shm_* functions
can be found if librt is indeed required. Passing -lrt through
CFLAGS is not portable.

Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 0d91c0a0
No related branches found
No related tags found
No related merge requests found
......@@ -62,10 +62,9 @@ AC_CHECK_FUNCS([lutimes futimes])
AC_CHECK_FUNCS([mkstemps mkdtemp])
# Avoid adding rt if absent or unneeded
AC_CHECK_LIB(rt, shm_open, [EXTRA_LIBS="$EXTRA_LIBS rt" CFLAGS="$CFLAGS -lrt"])
# needs -lrt on linux
AC_CHECK_FUNCS([shm_open shm_unlink])
# shm_open needs -lrt on linux
AC_SEARCH_LIBS(shm_open, rt, [AC_CHECK_FUNCS([shm_open shm_unlink])])
AS_IF([test "x$ac_cv_search_shm_open" = x-lrt], [EXTRA_LIBS="$EXTRA_LIBS rt"])
FP_CHECK_CONSTS([SIGABRT SIGALRM SIGBUS SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIGPOLL SIGPROF SIGSYS SIGTRAP SIGURG SIGVTALRM SIGXCPU SIGXFSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK], [
#if HAVE_SIGNAL_H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment