diff options
author | 2006-01-22 02:02:34 +1000 | |
---|---|---|
committer | 2006-01-22 02:02:34 +1000 | |
commit | 78296d4fac57bc03b93c6fade17a05c5888a4eef (patch) | |
tree | 45655e5bc2ea5dde7e12029ca7f7e9967bb522f3 /configure.ac | |
parent | fea22833cdc67dc1e304181de482b68302e51e11 (diff) |
Add autoconf test for presense of _nl_msg_cat_cntr
darcs-hash:20060121160234-ac50b-e41abc6688846ab207b9b6c3143cd694f8452154.gz
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7ba45b2e..cd839273 100644 --- a/configure.ac +++ b/configure.ac @@ -143,6 +143,7 @@ else AC_MSG_RESULT(no) fi + # Check for libraries AC_CHECK_LIB(socket, connect) AC_CHECK_LIB(rt, nanosleep) @@ -153,11 +154,27 @@ AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h term.h ncurses/term.h libintl # Check for various functions, and insert results into config.h AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp gettext fwprintf ) -AC_CHECK_FUNCS( futimes wcwidth wcswidth getopt_long wcstok fputwc fgetwc wcstol ) +AC_CHECK_FUNCS( futimes wcwidth wcswidth getopt_long wcstok fputwc fgetwc ) +AC_CHECK_FUNCS( wcstol dcgettext ) # Check again for gettext library, and insert results into the Makefile AC_CHECK_FUNC(gettext, AC_SUBST(HAVE_GETTEXT,1), AC_SUBST(HAVE_GETTEXT,0) ) +# Check for _nl_msg_cat_cntr symbol +AC_MSG_CHECKING([for _nl_msg_cat_cntr symbol]) +AC_TRY_LINK([#if HAVE_LIBINTL_H] +[#include <libintl.h>] +[#endif], +[extern int _nl_msg_cat_cntr;] +[int tmp = _nl_msg_cat_cntr;], have__nl_msg_cat_cntr=yes, have__nl_msg_cat_cntr=no) +if test "$have__nl_msg_cat_cntr" = yes; then + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE__NL_MSG_CAT_CNTR], [1], + [Define to 1 if the _nl_msg_cat_cntr synbol is exported.]) +else + AC_MSG_RESULT(no) +fi + # Check if we have ncurses, and use it rather than curses if possible. AC_CHECK_HEADERS([ncurses.h],[AC_SUBST(CURSESLIB,[ncurses]) AC_DEFINE(HAVE_NCURSES_H)],[AC_SUBST(CURSESLIB,[curses])]) |