1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

autoconf adjustments for OpenBSD

In OpenBSD we have two readline libs. On the one hand we have an old
version in the base OS and on the other hand we have an new one in the
ports tree. profanity needs the new one and should pick up the right
one. readline from ports tree is prefixed as ereadline.

Note:
Original patch by Rafael Sadowski.
Cleaned up by jubalh with heavy help of pasis.
This commit is contained in:
Rafael Sadowski 2015-10-09 00:45:36 +02:00 committed by Michael Vetter
parent 811b3ba857
commit 8fd77ea19b

View File

@ -22,6 +22,7 @@ AC_CANONICAL_HOST
PLATFORM="unknown"
AS_CASE([$host_os],
[freebsd*], [PLATFORM="freebsd"],
[openbsd*], [PLATFORM="openbsd"],
[darwin*], [PLATFORM="osx"],
[cygwin], [PLATFORM="cygwin"],
[PLATFORM="nix"])
@ -172,14 +173,22 @@ AS_IF([test "x$enable_icons" != xno],
[AC_MSG_ERROR([gtk+-2.0 or higher is required for icons])],
[AC_MSG_NOTICE([gtk+-2.0 not found, icons not enabled])])])])
AS_IF([test "x$PLATFORM" != xosx],
[AC_CHECK_LIB([readline], [main], [],
[AC_MSG_ERROR([libreadline is required for profanity])])],
AS_IF([test "x$PLATFORM" = xosx],
[AC_CHECK_FILE([/usr/local/opt/readline/lib],
[LIBS="-lreadline $LIBS"
AM_CPPFLAGS="-I/usr/local/opt/readline/include $AM_CPPFLAGS"
AM_LDFLAGS="-L/usr/local/opt/readline/lib $AM_LDFLAGS"
AC_SUBST(AM_LDFLAGS)],
[AC_MSG_ERROR([libreadline is required for profanity])])],
[test "x$PLATFORM" = xopenbsd],
[AC_CHECK_FILE([/usr/local/include/ereadline],
[LIBS="-lereadline $LIBS"
AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
AC_SUBST(AM_LDFLAGS)])],
[AC_CHECK_LIB([readline], [main], [],
[AC_MSG_ERROR([libreadline is required for profanity])])])
### Check for desktop notification support