From 110d67fb65e64b68e26dad77c2248bc4f6e13400 Mon Sep 17 00:00:00 2001 From: Lauri Alanko Date: Thu, 7 Jan 1999 19:54:45 +0000 Subject: [PATCH] Added stuff to make gcg by default (for maintainers) libgimp: Now keep a local copy of temp proc names --- ChangeLog | 37 +++++++++++++++++++++++++++++++++++++ Makefile.am | 2 +- autogen.sh | 9 ++++++++- configure.in | 50 ++++++++++++++++++++++++++++++++++++++++++-------- libgimp/gimp.c | 9 ++++++--- libgimp/gimp.h | 8 ++------ 6 files changed, 96 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2722ee8456..8e527af79c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +Thu Jan 7 21:33:39 EET 1999 Lauri Alanko + + * autogen.sh + * configure.in + * Makefile.am: + + Added stuff to make gcg by default (for maintainers) + + * app/Makefile.am + * app/app_procs.c + * app/appenv.h + * app/colormap_dialog.gc + * app/colormap_dialog.i.c + * app/commands.c + * app/convert.c + * app/gimage.c + * app/gimp.gh + * app/gimpimage.c + * app/gimpimage.h + * app/gimpset.c + * app/gimpset.h + * app/gimpsetP.h + * app/main.c + * app/preferences_dialog.c + * app/undo.c: + + Redid the indexed palette dialog to not crash, to be a bit more + usable, and to be a cleaner module. A first shot at using gcg in + actual practice.. + + If something is screwed, let me know! + + * libgimp/gimp.c + * libgimp/gimp.h: + + Now keep a local copy of temp proc names + Wed Jan 6 23:30:03 GMT 1999 Andy Thomas * app/indexed_palette.c diff --git a/Makefile.am b/Makefile.am index 57f3956d7d..cb0cc96778 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = po intl libgimp plug-ins app data @GIMPDOCS@ +SUBDIRS = po intl @GCG_SUBDIRS@ libgimp app plug-ins data @GIMPDOCS@ bin_SCRIPTS = gimptool diff --git a/autogen.sh b/autogen.sh index 24d40cc25c..ab20781430 100755 --- a/autogen.sh +++ b/autogen.sh @@ -88,7 +88,14 @@ automake $am_opt autoconf cd $ORIGDIR -$srcdir/configure "$@" +if test -z "$NO_GCG"; then + echo "Running autogen.sh under tools/gcg..." + cd tools/gcg + ./autogen.sh + cd $ORIGDIR +fi + +$srcdir/configure --enable-maintainer-mode "$@" echo echo "Now type 'make' to compile $PROJECT." diff --git a/configure.in b/configure.in index 1153709d03..4f275a9900 100644 --- a/configure.in +++ b/configure.in @@ -31,11 +31,53 @@ AM_MAINTAINER_MODE AC_CANONICAL_HOST +dnl Checks for programs. +AC_PROG_CC +AC_ISC_POSIX +AM_PROG_CC_STDC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_CPP + AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], if eval "test x$enable_debug = xyes"; then DEBUGFLAG="-g" fi) +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + +dnl Why the heck isn't there already a macro for this? + +AC_ARG_WITH(gnu-make, [ --with-gnu-make assume 'make' understands gnu extensions], +, +if $MAKE -v 2>/dev/null | grep 'GNU Make' >/dev/null; then + with_gnu_make=yes +fi) + +AC_ARG_WITH(gcg, [ --with-gcg build 'gcg' code generation tool], +, +with_gcg=$enable_maintainer_mode) + +if eval "test x$with_gcg = xyes"; then + GCG_SUBDIRS="tools/gcg" +else + GCG_SUBDIRS="" +fi + +AC_SUBST(GCG_SUBDIRS) +AC_CONFIG_SUBDIRS($GCG_SUBDIRS) + +AC_ARG_ENABLE(gcg-deps, [ --enable-gcg-deps turn on dynamic gcg dependency tracking (need gcc and gnu make)], +, +if eval "test x$GCC$with_gnu_make$with_gcg = xyesyesyes"; then + enable_gcg_deps=yes +fi) + +AM_CONDITIONAL(WITH_GCG, test x$with_gcg = xyes) +AM_CONDITIONAL(WITH_GNU_MAKE, test x$with_gnu_make = xyes) +AM_CONDITIONAL(ENABLE_GCG_DEPS, test x$enable_gcg_deps = xyes) + AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]], , enable_ansi=no) @@ -52,14 +94,6 @@ if test -n "$DEBUGFLAG"; then CFLAGS="$DEBUGFLAG $CFLAGS" fi -dnl Checks for programs. -AC_PROG_CC -AC_ISC_POSIX -AM_PROG_CC_STDC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_CPP dnl i18n stuff ALL_LINGUAS="fr sv ja it fi ko de hu" diff --git a/libgimp/gimp.c b/libgimp/gimp.c index bce95d9d7a..8c1df8d68e 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -245,7 +245,7 @@ gimp_progress_update (gdouble percentage) void -gimp_message (char *message) +gimp_message (const gchar *message) { GParam *return_vals; int nreturn_vals; @@ -486,18 +486,21 @@ gimp_install_temp_proc (char *name, nparams, nreturn_vals, params, return_vals); /* Insert the temp proc run function into the hash table */ - g_hash_table_insert (temp_proc_ht, (gpointer) name, (gpointer) run_proc); + g_hash_table_insert (temp_proc_ht, g_strdup (name), (gpointer) run_proc); } void gimp_uninstall_temp_proc (char *name) { GPProcUninstall proc_uninstall; - + gpointer hash_name; proc_uninstall.name = name; if (!gp_proc_uninstall_write (_writefd, &proc_uninstall)) gimp_quit (); + + g_hash_table_lookup_extended (temp_proc_ht, name, &hash_name, NULL); + g_free (hash_name); g_hash_table_remove (temp_proc_ht, (gpointer) name); } diff --git a/libgimp/gimp.h b/libgimp/gimp.h index d55b7755a1..6316431d74 100644 --- a/libgimp/gimp.h +++ b/libgimp/gimp.h @@ -70,11 +70,7 @@ struct _GPlugInInfo /* called to run a procedure the plug-in installed in the * procedure database. */ - void (*run_proc) (char *name, - int nparams, - GParam *param, - int *nreturn_vals, - GParam **return_vals); + GRunProc run_proc; }; struct _GTile @@ -223,7 +219,7 @@ void gimp_progress_update (gdouble percentage); /* Pops up a dialog box with "message". Useful for status and * error reports. If "message" is NULL, do nothing. */ -void gimp_message (char *message); +void gimp_message (const gchar *message); /* Query the gimp application's procedural database.