From 5b58e078011331bb189ab1124fc6775aff74f31d Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 8 Aug 2010 15:15:49 +0200 Subject: [PATCH] First compilation. --- configure.ac | 10 +++++++++- src/Makefile.am | 20 ++++++++++---------- src/aute_smbldap.c | 10 ++-------- src/user.c | 4 +--- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 2117831..3cd1783 100644 --- a/configure.ac +++ b/configure.ac @@ -18,13 +18,21 @@ AC_PROG_CC 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") diff --git a/src/Makefile.am b/src/Makefile.am index 3a07774..f69e3e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,22 +1,22 @@ -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 diff --git a/src/aute_smbldap.c b/src/aute_smbldap.c index 0eaa046..c63d2b8 100644 --- a/src/aute_smbldap.c +++ b/src/aute_smbldap.c @@ -108,7 +108,7 @@ static GtkWindow } static gchar -*controllo () +*controllo (GSList *parameters) { gchar *user_dn; gchar *utente; @@ -392,12 +392,6 @@ gchar error = NULL; - get_gdaex (parameters); - if (gdaex == NULL) - { - return NULL; - } - gtkbuilder = gtk_builder_new (); #ifdef G_OS_WIN32 @@ -444,7 +438,7 @@ gchar { case GTK_RESPONSE_OK: /* controllo dell'utente e della password */ - ret = controllo (); + ret = controllo (parameters); break; case GTK_RESPONSE_CANCEL: diff --git a/src/user.c b/src/user.c index 251c9d3..12e1648 100644 --- a/src/user.c +++ b/src/user.c @@ -20,7 +20,7 @@ #include #include "user.h" -#include "aute_db.h" +#include "aute_smbldap.h" static void user_class_init (UserClass *klass); static void user_init (User *user); @@ -229,8 +229,6 @@ user_salva (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 -- 2.49.0