about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--configure.ac14
1 files changed, 8 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 77d2a7a0..19c9b984 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,8 +135,8 @@ 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])])
+AC_CHECK_LIB([readline], [main], [],
+    [AC_MSG_ERROR([libreadline is required for profanity])])
 
 AS_IF([test "x$PLATFORM" = xosx], [LIBS="-lcurl $LIBS"])
 
@@ -236,10 +236,12 @@ 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"
 
-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)
+### 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)