Blame SOURCES/0001-configure-actually-define-HAVE_GETUSERSHELL.patch

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