Skip to content

Commit

Permalink
Fix klali comment
Browse files Browse the repository at this point in the history
  • Loading branch information
baimard committed Dec 5, 2020
1 parent 683d79f commit e663351
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 446 deletions.
11 changes: 6 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ SUBDIRS = . tests
ACLOCAL_AMFLAGS = -I m4

AM_CFLAGS = $(WARN_CFLAGS)
#Mysql
AM_CFLAGS += @MYSQL_CFLAGS@
AM_CPPFLAGS = @YKPERS_CFLAGS@

libdir = $(PAMDIR)
Expand All @@ -45,11 +43,14 @@ pam_yubico_la_LIBADD = @LTLIBYUBIKEY@ @LTLIBYKCLIENT@ @LIBLDAP@ @LIBPAM@
pam_yubico_la_LIBADD += libpam_util.la libpam_real.la
pam_yubico_la_LDFLAGS = -module -avoid-version



noinst_LTLIBRARIES = libpam_util.la libpam_real.la
libpam_util_la_SOURCES = util.c util.h
libpam_util_la_LIBADD = @LTLIBYUBIKEY@ @YKPERS_LIBS@ @MYSQL_LIBS@
libpam_util_la_LIBADD = @LTLIBYUBIKEY@ @YKPERS_LIBS@

# if MYSQL_SUPPORT
AM_CFLAGS += @MYSQL_CFLAGS@
libpam_util_la_LIBADD += @MYSQL_LIBS@
# endif

libpam_real_la_SOURCES = pam_yubico.c

Expand Down
22 changes: 15 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ AC_ARG_WITH([ldap],
[libldap not found, will not be compiled (--without-ldap to disable ldap support)])],
[])])

AC_ARG_WITH([mysql],
[AS_HELP_STRING([--without-mysql],
[disable support for mysql])],
[],
[with_mysql=yes])
AS_IF([test "x$with_mysql" != xno],
[
PKG_CHECK_MODULES([MYSQL], [mysqlclient])
AC_DEFINE([HAVE_MYSQL], [1],[Define if you have mysqlclient])
],
[
AC_DEFINE([HAVE_MYSQL], [0],[Define if you have mysqlclient])
])
AM_CONDITIONAL(MYSQL_SUPPORT,test "x$with_mysql" != xno)

AC_LIB_HAVE_LINKFLAGS([ykclient],, [#include <ykclient.h>],
[ykclient_set_proxy(0, 0)])
Expand Down Expand Up @@ -183,12 +197,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],

AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(tests/Makefile)

#Mysql
WITH_MYSQL()
MYSQL_USE_CLIENT_API()
MYSQL_SUBST()

AC_OUTPUT

AC_MSG_NOTICE([Summary of build options:
Expand All @@ -200,4 +208,4 @@ AC_MSG_NOTICE([Summary of build options:
Library types: Shared=${enable_shared}, Static=${enable_static}
LDAP: ${with_ldap}
Challenge-Response: ${with_cr}
])
])

0 comments on commit e663351

Please sign in to comment.