From 8e3bad7b7eb7212aa7554fa445b2e8e29daaacaa Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 6 Sep 2016 15:33:30 -0400 Subject: [PATCH] configure: actually define HAVE_GETUSERSHELL currently we check for it but never actually set it, leading to dead code. This commit fixes that. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index eb5360e..54f4eb4 100644 --- a/configure.ac +++ b/configure.ac @@ -160,60 +160,65 @@ AC_CACHE_CHECK([for supported warning flags], accountsservice_cv_warn_cflags, [ ACCOUNTSSERVICE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"]) done accountsservice_cv_warn_cflags=$WARN_CFLAGS accountsservice_cv_warn_maybe=$MAYBE_WARN AC_MSG_CHECKING([which warning flags were supported]) ]) WARN_CFLAGS="$accountsservice_cv_warn_cflags" if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then # Only add this when optimizing is enabled (default) AC_MSG_CHECKING([whether optimization is enabled]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if __OPTIMIZE__ == 0 #error No optimization #endif ]], [[]])], [has_optimization=yes], [has_optimization=no]) if test $has_optimization = yes; then WARN_CFLAGS="$WARN_CFLAGS -Wp,-D_FORTIFY_SOURCE=2" fi AC_MSG_RESULT($has_optimization) fi AC_SUBST(WARN_CFLAGS) AC_CHECK_HEADERS([shadow.h utmpx.h]) +AC_CHECK_LIB(c, getusershell, have_getusershell=yes, have_getusershell=no) +if test x$have_getusershell = xyes; then + AC_DEFINE(HAVE_GETUSERSHELL, 1, [Define i getusershell() is available]) +fi + dnl --------------------------------------------------------------------------- dnl - gtk-doc Documentation dnl --------------------------------------------------------------------------- m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) ],[ AM_CONDITIONAL([ENABLE_GTK_DOC],[false]) ]) dnl --------------------------------------------------------------------------- dnl - DocBook Documentation dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(docbook-docs, [AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])], enable_docbook_docs=$enableval,enable_docbook_docs=no) AC_PATH_PROG(XMLTO, xmlto, no) AC_MSG_CHECKING([whether to build DocBook documentation]) if test x$XMLTO = xno ; then have_docbook=no else have_docbook=yes fi if test x$enable_docbook_docs = xauto ; then if test x$have_docbook = xno ; then enable_docbook_docs=no else enable_docbook_docs=yes fi -- 2.7.4