Fix compilation of the library.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 12 Feb 2007 11:22:23 +0000 (12:22 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 12 Feb 2007 11:22:23 +0000 (12:22 +0100)
.bzrignore
Makefile
Makefile.settings.in
common/credentials.c
common/gtk-smb.c
common/gtk-smb.h
common/gtk_events.c
common/select.c
configure.ac
tools/gepdump.c

index 9f3e877bbad146caccf99ea919fbf1ee6f188cf0..59858d8a0d551f4b211f1e9ff4a43297c8724c7f 100644 (file)
@@ -6,3 +6,4 @@ config.status
 configure
 gtksamba.pc
 man/*.1
+libsamba-gtk.so.0.0.1
index dd66752d6846b58839a8124d7dd0bac9b5d0e33f..3556b658afc7ebe8a3c7be7580698e8cb7b7d9d4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,22 @@
 include Makefile.settings
 
 BINS = gepdump gregedit gwcrontab gwsam gwsvcctl
-CFLAGS = $(GTK_CFLAGS) $(TALLOC_CFLAGS) -I.
-LIBS = $(GTK_LIBS) $(TALLOC_LIBS)
+CFLAGS = $(GTK_CFLAGS) $(TALLOC_CFLAGS) $(DCERPC_CFLAGS) $(GENSEC_CFLAGS) -I.
+LIBS = $(GTK_LIBS) $(TALLOC_LIBS) $(DCERPC_LIBS) $(GENSEC_LIBS) 
+
 LIB = libsamba-gtk.so.0.0.1
+MANPAGES = man/gepdump.1 man/gwcrontab.1 man/gwsvcctl.1 man/gregedit.1
 
 all: $(BINS) $(LIB)
 
+install:: $(BINS) $(LIB)
+       $(INSTALL) -d $(bindir) $(libdir) $(man1dir)
+       $(INSTALL) -m 0755 $(BINS) $(bindir)
+       $(INSTALL) -m 0755 $(LIBDIR) $(libdir)
+
+install-doc::
+       $(INSTALL) -m 0644 $(MANPAGES) $(man1dir)
+
 configure: 
        autoconf -f
 
@@ -18,7 +28,7 @@ $(LIB): $(patsubst %.c, %.o, $(wildcard common/*.c))
        ln -s $(LIB) libsamba-gtk.so 
 
 %.o: %.c
-       $(CC) $(CFLAGS) -c $<
+       $(CC) $(CFLAGS) -o $@ -c $<
 
 $(BINS): %: tools/%.o $(LIB)
        $(CC) -o $@ $< -lsamba-gtk -L. $(LIBS)
@@ -35,7 +45,7 @@ distclean:: clean
 
 dist:: configure distclean
 
-doc:: man/gepdump.1 man/gwcrontab.1 man/gwsvcctl.1 man/gregedit.1
+doc:: $(MANPAGES)
 
 DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
 
index ee013afa7b5158de6efe04c6d091e729903f8a26..fe2b7fad1a19ba7152319ac7ce1733c12294c4a1 100644 (file)
@@ -7,4 +7,20 @@ GTK_LIBS = @GTK_LIBS@
 TALLOC_CFLAGS = @TALLOC_CFLAGS@
 TALLOC_LIBS = @TALLOC_LIBS@
 
+DCERPC_CFLAGS = @DCERPC_CFLAGS@
+DCERPC_LIBS = @DCERPC_LIBS@
+
+GENSEC_CFLAGS = @GENSEC_CFLAGS@
+GENSEC_LIBS = @GENSEC_LIBS@
+
 XSLTPROC = @XSLTPROC@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+
+datarootdir = @datarootdir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
index 97e71c329c1e19c23c76e67deaa6bd36e8700e4f..41457e635467589b053ff9798c09c8c7fd34a2e3 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "includes.h"
-#include "gtk/common/gtk-smb.h"
-#include "auth/credentials/credentials.h"
+#include <stdbool.h>
+#include <stdint.h>
+#include "common/gtk-smb.h"
+#include <credentials.h>
 
 static void gtk_get_credentials(struct cli_credentials *credentials)
 {
index cb445d8268062fa14a10e0cd6221593553f372b8..4eef46b0f98b85646f7c71b1f488bc28d0b455e2 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "includes.h"
-#include "gtk/common/gtk-smb.h"
-#include "gtk/common/select.h"
-#include "version.h"
-#include "librpc/rpc/dcerpc.h"
-#include "auth/credentials/credentials.h"
+#define _GNU_SOURCE
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <core.h>
+#include <samba/version.h>
+#include "common/gtk-smb.h"
+#include "common/select.h"
+#include <dcerpc.h>
+#include <credentials.h>
 
 /** 
  * Dialog error showing a WERROR
index 2f6edcc8ebaaa57c1fd6dcd008c71ceb5679082f..801e1cab79fa1a536d4703bf24263091ff9d1b17 100644 (file)
@@ -25,6 +25,7 @@
 #define GTK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 #include <talloc.h>
+#include <core.h>
 
 typedef struct _GtkRpcBindingDialog GtkRpcBindingDialog;
 
index 45e103109365dd59a82f4d2356dc5a66cf3e5af6..8404afdd602ae62f7b7b3b6d3253ab48c9600ccd 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "includes.h"
-#include "lib/events/events.h"
-#include "lib/events/events_internal.h"
-
-#include "gtk/common/select.h"
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/time.h>
+#include <core.h>
+#include <util.h>
+#include <events/events.h>
+#include <events/events_internal.h>
+
+#include "common/select.h"
 
 /* as gtk_main() doesn't take a parameter nor return one,
    we need to have a global event context structure for our
@@ -50,8 +57,8 @@ static int gtk_event_context_init(struct event_context *ev)
 }
 
 struct gtk_fd_event {
-       BOOL running;
-       BOOL free_after_run;
+       bool running;
+       bool free_after_run;
        GIOChannel *channel;
        guint fd_id;
 };
@@ -68,9 +75,9 @@ static gboolean gtk_event_fd_handler(GIOChannel *source, GIOCondition condition,
        if (condition & G_IO_OUT)
                flags |= EVENT_FD_WRITE;
 
-       gtk_fd->running = True;
+       gtk_fd->running = true;
        fde->handler(fde->event_ctx, fde, flags, fde->private_data);
-       gtk_fd->running = False;
+       gtk_fd->running = false;
 
        if (gtk_fd->free_after_run) {
                talloc_free(fde);
@@ -92,7 +99,7 @@ static int gtk_event_fd_destructor(struct fd_event *fde)
                /* the event is running reject the talloc_free()
                   as it's done by the gtk_event_timed_handler()
                 */
-               gtk_fd->free_after_run = True;
+               gtk_fd->free_after_run = true;
                return -1;
        }
 
@@ -156,8 +163,8 @@ static struct fd_event *gtk_event_add_fd(struct event_context *ev, TALLOC_CTX *m
                fd_id = g_io_add_watch(channel, condition, gtk_event_fd_handler, fde);
        }
 
-       gtk_fd->running         = False;
-       gtk_fd->free_after_run  = False;
+       gtk_fd->running         = false;
+       gtk_fd->free_after_run  = false;
        gtk_fd->channel         = channel;
        gtk_fd->fd_id           = fd_id;
 
index 5a0480ab28cd778a5dea10e038f529a704b6e130..70192fb452fd6d9b5521ad351af070d878747c68 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_samr_c.h"
-#include "gtk/common/select.h"
-#include "gtk/common/gtk-smb.h"
-#include "auth/credentials/credentials.h"
+#define _GNU_SOURCE
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <dcerpc/ndr_samr_c.h>
+#include "common/select.h"
+#include "common/gtk-smb.h"
+#include <credentials.h>
 
 /* GtkSelectDomainDialog */
 
index 721fc2d6aa735ae42267470e8c7577287a96ae3d..ebe966f505a91c9b444f0f39c03b4de8f73ad58f 100644 (file)
@@ -5,6 +5,8 @@ AC_PATH_PROG(XSLTPROC, xsltproc)
 
 PKG_CHECK_MODULES(GTK, [glib-2.0 gtk+-2.0 >= 2.4])
 PKG_CHECK_MODULES(TALLOC, [talloc])
+PKG_CHECK_MODULES(DCERPC, [dcerpc])
+PKG_CHECK_MODULES(GENSEC, [gensec])
 
 AC_CONFIG_FILES([Makefile.settings gtksamba.pc])
 AC_OUTPUT
index 92ff2643a5b66551183cc2ba697a54a9f38090c2..fcf236c88cf5cddb38dc443640d3b48c6991c23f 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "librpc/gen_ndr/ndr_epmapper_c.h"
-#include "librpc/gen_ndr/ndr_mgmt_c.h"
+#define _GNU_SOURCE
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <dcerpc.h>
+#include <dcerpc/ndr_mgmt_c.h>
+#include <dcerpc/ndr_epmapper_c.h>
 #include "common/gtk-smb.h"
 #include "common/select.h"
-#include "auth/gensec/gensec.h"
+#include <gensec.h>
 #include <stdbool.h>
 
 /*