1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge pull request #1617 from carlocab/osx-configure

Make readline check more portable
This commit is contained in:
Michael Vetter 2021-11-24 00:36:09 +01:00 committed by GitHub
commit 6d2f929950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,12 +210,21 @@ AS_IF([test "x$enable_icons_and_clipboard" != xno],
[AC_MSG_NOTICE([gtk+-3.0/gtk+2.0 not found, icons and clipboard not enabled])])])])])
AS_IF([test "x$PLATFORM" = xosx],
[AC_CHECK_FILE([/usr/local/opt/readline/lib],
[AC_PATH_PROG([BREW], [brew], ["failed"],
[$PATH:/opt/homebrew/bin:/usr/local/bin])
AS_IF([test "x$BREW" = xfailed],
[AC_CHECK_FILE([/opt/local/lib/libreadline.dylib],
[READLINE_PREFIX="/opt/local"],
[READLINE_PREFIX="/usr/local"])],
[READLINE_PREFIX="`$BREW --prefix readline`"])])
AS_IF([test "x$PLATFORM" = xosx],
[AC_CHECK_FILE([$READLINE_PREFIX/lib/libreadline.dylib],
[LIBS="-lreadline $LIBS"
AM_CPPFLAGS="-I/usr/local/opt/readline/include $AM_CPPFLAGS"
AM_LDFLAGS="-L/usr/local/opt/readline/lib $AM_LDFLAGS"
AM_CPPFLAGS="-I$READLINE_PREFIX/include $AM_CPPFLAGS"
AM_LDFLAGS="-L$READLINE_PREFIX/lib $AM_LDFLAGS"
AC_SUBST(AM_LDFLAGS)],
[AC_MSG_ERROR([libreadline is required for profanity])])],
[AC_MSG_ERROR([libreadline is required for profanity. Install it with Homebrew, MacPorts, or manually into /usr/local])])],
[test "x$PLATFORM" = xopenbsd],
[AC_CHECK_FILE([/usr/local/include/ereadline],