From 768df4d736722d8d2be04778839162b8948afab1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 8 Mar 2014 23:57:50 +0000 Subject: [PATCH 1/3] Ncurses include libs before wget_wch check --- configure.ac | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 3abf8c1e..cae11a43 100644 --- a/configure.ac +++ b/configure.ac @@ -94,22 +94,23 @@ PKG_CHECK_MODULES([ncursesw], [ncursesw], [AC_MSG_ERROR([ncurses is required for profanity])])])])]) AM_CPPFLAGS="$AM_CPPFLAGS $NCURSES_CFLAGS" LIBS="$LIBS $NCURSES_LIBS" +AS_IF([test "x$PLATFORM" = xosx], [LIBS="$LIBS -lncurses -lcurl"]) ### Check wide characters support in ncurses library -###CFLAGS_RESTORE="$CFLAGS" -###CFLAGS="$CFLAGS $NCURSES_CFLAGS" -###AC_CACHE_CHECK([for wget_wch support in $NCURSES], ncurses_cv_wget_wch, -### [AC_LINK_IFELSE([AC_LANG_SOURCE([ -### #include -### int main() { -### (void)wget_wch(NULL, NULL); -### return 0; -### } -### ])], -### [ncurses_cv_wget_wch=yes], -### [ncurses_cv_wget_wch=no]) -### ]) -###CFLAGS="$CFLAGS_RESTORE" +CFLAGS_RESTORE="$CFLAGS" +CFLAGS="$CFLAGS $NCURSES_CFLAGS" +AC_CACHE_CHECK([for wget_wch support in $NCURSES], ncurses_cv_wget_wch, + [AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { + (void)wget_wch(NULL, NULL); + return 0; + } + ])], + [ncurses_cv_wget_wch=yes], + [ncurses_cv_wget_wch=no]) + ]) +CFLAGS="$CFLAGS_RESTORE" ###AS_IF([test "x$ncurses_cv_wget_wch" != xyes], ### [AC_MSG_ERROR([ncurses does not support wide characters])]) @@ -206,8 +207,6 @@ AS_IF([test "x$PACKAGE_STATUS" = xdevelopment], AM_CPPFLAGS="$AM_CPPFLAGS $glib_CFLAGS $curl_CFLAGS $libnotify_CFLAGS" LIBS="$LIBS $glib_LIBS $curl_LIBS $libnotify_LIBS" -AS_IF([test "x$PLATFORM" = xosx], [LIBS="$LIBS -lncurses -lcurl"]) - AC_SUBST(AM_CFLAGS) AC_SUBST(AM_CPPFLAGS) From 7fa9ecc76d659b45834376ff4f8ea5d343a805e7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Mar 2014 00:02:34 +0000 Subject: [PATCH 2/3] Uncomment ncurses check --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cae11a43..f2f8d2f2 100644 --- a/configure.ac +++ b/configure.ac @@ -112,8 +112,8 @@ AC_CACHE_CHECK([for wget_wch support in $NCURSES], ncurses_cv_wget_wch, ]) CFLAGS="$CFLAGS_RESTORE" -###AS_IF([test "x$ncurses_cv_wget_wch" != xyes], -### [AC_MSG_ERROR([ncurses does not support wide characters])]) +AS_IF([test "x$ncurses_cv_wget_wch" != xyes], + [AC_MSG_ERROR([ncurses does not support wide characters])]) ### Check for other profanity dependencies PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.26], [], From 72c35553fd532848bbab9a540eb00d87df5644ec Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Mar 2014 00:04:39 +0000 Subject: [PATCH 3/3] Split ncurses and curl LIB additions --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f2f8d2f2..cfbb0728 100644 --- a/configure.ac +++ b/configure.ac @@ -94,7 +94,7 @@ PKG_CHECK_MODULES([ncursesw], [ncursesw], [AC_MSG_ERROR([ncurses is required for profanity])])])])]) AM_CPPFLAGS="$AM_CPPFLAGS $NCURSES_CFLAGS" LIBS="$LIBS $NCURSES_LIBS" -AS_IF([test "x$PLATFORM" = xosx], [LIBS="$LIBS -lncurses -lcurl"]) +AS_IF([test "x$PLATFORM" = xosx], [LIBS="$LIBS -lncurses"]) ### Check wide characters support in ncurses library CFLAGS_RESTORE="$CFLAGS" @@ -120,6 +120,7 @@ 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])]) +AS_IF([test "x$PLATFORM" = xosx], [LIBS="$LIBS -lcurl"]) ### Check for desktop notification support ### Linux requires libnotify