1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added conditional OSX check for readline

This commit is contained in:
James Booth 2015-03-08 18:47:01 +00:00
parent 13c1eb2744
commit e361ea6922

View File

@ -135,8 +135,16 @@ PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.26], [],
[AC_MSG_ERROR([glib 2.26 or higher is required for profanity])])
PKG_CHECK_MODULES([curl], [libcurl], [],
[AC_MSG_ERROR([libcurl is required for profanity])])
AC_CHECK_LIB([readline], [main], [],
[AC_MSG_ERROR([libreadline is required for profanity])])
AS_IF([test "x$PLATFORM" != xosx],
[AC_CHECK_LIB([readline], [main], [],
[AC_MSG_ERROR([libreadline is required for profanity])])],
[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])])])
AS_IF([test "x$PLATFORM" = xosx], [LIBS="-lcurl $LIBS"])
@ -236,13 +244,6 @@ AM_CPPFLAGS="$AM_CPPFLAGS $glib_CFLAGS $curl_CFLAGS $libnotify_CFLAGS"
AM_CPPFLAGS="$AM_CPPFLAGS -DTHEMES_PATH=\"\\\"$THEMES_PATH\\\"\""
LIBS="$glib_LIBS $curl_LIBS $libnotify_LIBS $LIBS"
### Use brew installed gnu readline
AS_IF([test "x$PLATFORM" = xosx], [
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_SUBST(AM_CFLAGS)
AC_SUBST(AM_CPPFLAGS)