about summary refs log tree commit diff stats
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-03-08 23:57:50 +0000
committerJames Booth <boothj5@gmail.com>2014-03-08 23:57:50 +0000
commit768df4d736722d8d2be04778839162b8948afab1 (patch)
tree3dea89568265929e3e150deb03696df8e824b0e1 /configure.ac
parent2b3d64514712e17f52dd7df3e4d1bfa41c92c892 (diff)
downloadprofani-tty-768df4d736722d8d2be04778839162b8948afab1.tar.gz
Ncurses include libs before wget_wch check
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files 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 <ncurses.h>
-###       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 <ncurses.h>
+       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)