AC_PROG_LIBTOOL
# Checks for libraries.
-PKG_CHECK_MODULES(LIBAUTEDB, [gtk+-2.0 >= 2.16.0
+PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-2.0 >= 2.16.0
libaute >= 0.1.0
libgtkform >= 0.1.4])
AC_SUBST(LIBAUTESMBLDAP_CFLAGS)
AC_SUBST(LIBAUTESMBLDAP_LIBS)
+with_ldap=no
+AC_CHECK_LIB([ldap], [ldap_initialize], with_ldap=yes)
+
+if test "$with_ldap" = "yes"
+then
+ AC_SUBST(LIBLDAP_LIBS, [" -lldap"])
+fi
+
PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], [AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes], have_libconfi=no)
AM_CONDITIONAL(HAVE_LIBCONFI, test x"$have_libconfi" = "xyes")
-guidir = $(datadir)/libaute-db/gui
-formdir = $(datadir)/libaute-db/form
+guidir = $(datadir)/libaute-smbldap/gui
+formdir = $(datadir)/libaute-smbldap/form
-AM_CPPFLAGS = $(LIBAUTEDB_CFLAGS) \
- $(LIBGCRYPT_CFLAGS) \
+AM_CPPFLAGS = $(LIBAUTESMBLDAP_CFLAGS) \
+ $(LIBLDAP_CFLAGS) \
$(LIBCONFI_CFLAGS) \
-DGUIDIR=\""$(guidir)"\" \
-DFORMDIR=\""$(formdir)"\"
-LIBS = $(LIBAUTEDB_LIBS) \
- $(LIBGCRYPT_LIBS) \
+LIBS = $(LIBAUTESMBLDAP_LIBS) \
+ $(LIBLDAP_LIBS) \
$(LIBCONFI_LIBS)
libaute_pluginsdir = $(libdir)/libaute/plugins
-libaute_plugins_LTLIBRARIES = libaute-db.la
+libaute_plugins_LTLIBRARIES = libaute-smbldap.la
-libaute_db_la_SOURCES = aute_db.c \
- aute_db.h \
+libaute_smbldap_la_SOURCES = aute_smbldap.c \
+ aute_smbldap.h \
user.c \
user.h
-libaute_db_la_LDFLAGS = -no-undefined
+libaute_smbldap_la_LDFLAGS = -no-undefined
}
static gchar
-*controllo ()
+*controllo (GSList *parameters)
{
gchar *user_dn;
gchar *utente;
error = NULL;
- get_gdaex (parameters);
- if (gdaex == NULL)
- {
- return NULL;
- }
-
gtkbuilder = gtk_builder_new ();
#ifdef G_OS_WIN32
{
case GTK_RESPONSE_OK:
/* controllo dell'utente e della password */
- ret = controllo ();
+ ret = controllo (parameters);
break;
case GTK_RESPONSE_CANCEL:
#include <libgtkform/form.h>
#include "user.h"
-#include "aute_db.h"
+#include "aute_smbldap.h"
static void user_class_init (UserClass *klass);
static void user_init (User *user);
if (priv->code == NULL || g_strcmp0 (priv->code, "") == 0)
{
- gtk_label_set_text (GTK_LABEL (priv->objects[LBL_PASSWORD]),
- autedb_cifra_password (gtk_entry_get_text (GTK_ENTRY (priv->objects[TXT_CODE]))));
sql = gtk_form_get_sql (priv->form, GTK_FORM_SQL_INSERT);
}
else