agetpass: Hook into build-system
Signed-off-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
ab91ec10b4
commit
2a5b8810bb
15
configure.ac
15
configure.ac
@ -405,6 +405,21 @@ AC_SUBST(LIYESCRYPT)
|
|||||||
AC_CHECK_LIB(crypt, crypt, [LIYESCRYPT=-lcrypt],
|
AC_CHECK_LIB(crypt, crypt, [LIYESCRYPT=-lcrypt],
|
||||||
[AC_MSG_ERROR([crypt() not found])])
|
[AC_MSG_ERROR([crypt() not found])])
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS([readpassphrase], [bsd], [], [
|
||||||
|
AC_MSG_ERROR([readpassphrase() is missing, either from libc or libbsd])
|
||||||
|
])
|
||||||
|
AS_IF([test "$ac_cv_search_readpassphrase" = "-lbsd"], [
|
||||||
|
PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay])
|
||||||
|
])
|
||||||
|
dnl Make sure either the libc or libbsd provide the header.
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
|
||||||
|
AC_CHECK_HEADERS([readpassphrase.h])
|
||||||
|
AS_IF([test "$ac_cv_header_readpassphrase_h" != "yes"], [
|
||||||
|
AC_MSG_ERROR([readpassphrase.h is missing])
|
||||||
|
])
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
AC_SUBST(LIBACL)
|
AC_SUBST(LIBACL)
|
||||||
if test "$with_acl" != "no"; then
|
if test "$with_acl" != "no"; then
|
||||||
AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
|
AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
|
||||||
|
@ -5,6 +5,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
|
|||||||
|
|
||||||
noinst_LTLIBRARIES = libmisc.la
|
noinst_LTLIBRARIES = libmisc.la
|
||||||
|
|
||||||
|
libmisc_la_CFLAGS = $(LIBBSD_CFLAGS)
|
||||||
libmisc_la_SOURCES = \
|
libmisc_la_SOURCES = \
|
||||||
addgrps.c \
|
addgrps.c \
|
||||||
age.c \
|
age.c \
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <readpassphrase.h>
|
#include <readpassphrase.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user