Optionally link to libnotify on non-Linux systems.

[CONFIGURATION]
* BUG: Optionally link to libnotify on non-Linux systems.
This commit is contained in:
gambas 2018-11-21 00:11:42 +01:00
parent 1ba102c453
commit bd8a5fc56e
2 changed files with 32 additions and 3 deletions

View file

@ -227,10 +227,14 @@ AC_DEFUN([GB_INIT],
GB_MATH()
dnl ---- Check for gettext lib
dnl ---- Check for gettext library
GB_GETTEXT()
dnl ---- Check for inotify library
GB_INOTIFY()
dnl ---- Check for monotonic clock
GB_MONOTONIC()
@ -709,6 +713,31 @@ AC_DEFUN([GB_GETTEXT],
])
## ---------------------------------------------------------------------------
## GB_INOTIFY
## Detects if we must link to an external inotify library
## ---------------------------------------------------------------------------
AC_DEFUN([GB_INOTIFY],
[
AC_MSG_CHECKING(for external inotify library)
case "${host}" in
*-*-linux* )
INOTIFY_LIB=
;;
*)
INOTIFY_LIB=-linofity
;;
esac
AC_SUBST(INOTIFY_LIB)
AC_SUBST(INOTIFY_LDFLAGS)
AC_MSG_RESULT($INOTIFY_LIB)
])
## ---------------------------------------------------------------------------
## GB_MONOTONIC
## Detect monotonic clock

View file

@ -50,7 +50,7 @@ GB_COMPONENT(
gettext, GETTEXT, libgettextlib, [],
[],
[GB_FIND(libgettextlib.$SHLIBEXT, /opt/local /usr/local /usr, lib)],
[-lgettextlib],
[$GETTEXT_LIB],
[],
[Cannot find 'libgettextlib' library. It may be merged inside the system C library, so you can ignore that warning...])
@ -92,7 +92,7 @@ GB_COMPONENT(
inotify, INOTIFY, gb.inotify, [inotify],
[GB_FIND(sys/inotify.h, /usr/local/lib /usr/local /usr/lib /usr, include)],
[GB_FIND(, /usr/local /usr, lib)],
[$C_LIB])
[$INOTIFY_LIB])
dnl ---- We do not use libtool to load shared libraries anymore!