Merged Yosh's changes from stable branch:

2001-04-23  Sven Neumann  <sven@gimp.org>

	Merged Yosh's changes from stable branch:

	* acinclude.m4: updated libtool stuff

        * configure.in: more #undefs so jpeglib.h test works

        * plug-ins/common/bumpmap.c: speedup patch from Ernst Lippe
        <ernstl@planet.nl> (tile cache size optimization)
This commit is contained in:
Sven Neumann
2001-04-23 15:46:23 +00:00
committed by Sven Neumann
parent 57293f35df
commit 2c89973c96
4 changed files with 56 additions and 25 deletions

View File

@ -1,3 +1,14 @@
2001-04-23 Sven Neumann <sven@gimp.org>
Merged Yosh's changes from stable branch:
* acinclude.m4: updated libtool stuff
* configure.in: more #undefs so jpeglib.h test works
* plug-ins/common/bumpmap.c: speedup patch from Ernst Lippe
<ernstl@planet.nl> (tile cache size optimization)
2001-04-23 Sven Neumann <sven@gimp.org> 2001-04-23 Sven Neumann <sven@gimp.org>
Merged changes from stable branch: Merged changes from stable branch:

View File

@ -1,5 +1,5 @@
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999 Free Software Foundation, Inc. ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
## ##
## This program is free software; you can redistribute it and/or modify ## This program is free software; you can redistribute it and/or modify
@ -371,31 +371,35 @@ esac
]) ])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library, adds --enable-ltdl-convenience to # the libltdl convenience library and INCLTDL to the include flags for
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # the libltdl header and adds --enable-ltdl-convenience to the
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # configure arguments. Note that LIBLTDL and INCLTDL are not
# to be `${top_builddir}/libltdl'. Make sure you start DIR with # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# '${top_builddir}/' (note the single quotes!) if your package is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# flat, and, if you're not using automake, define top_builddir as # with '${top_builddir}/' and INCLTDL will be prefixed with
# appropriate in the Makefiles. # '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case "$enable_ltdl_convenience" in case "$enable_ltdl_convenience" in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes "") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac esac
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
]) ])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library, and adds --enable-ltdl-install to # the libltdl installable library and INCLTDL to the include flags for
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # the libltdl header and adds --enable-ltdl-install to the configure
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# to be `${top_builddir}/libltdl'. Make sure you start DIR with # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# '${top_builddir}/' (note the single quotes!) if your package is not # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# flat, and, if you're not using automake, define top_builddir as # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# appropriate in the Makefiles. # with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main, AC_CHECK_LIB(ltdl, main,
@ -408,8 +412,8 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
]) ])
if test x"$enable_ltdl_install" = x"yes"; then if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install" ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no" ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl" LIBLTDL="-lltdl"
@ -428,7 +432,6 @@ AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
dnl This is just to silence aclocal about the macro not being used dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl ifelse([AC_DISABLE_FAST_INSTALL])dnl
## Find the install dirs for the python installation. ## Find the install dirs for the python installation.
## By James Henstridge ## By James Henstridge

View File

@ -81,6 +81,14 @@ dnl Check for GTK+
AM_PATH_GTK(1.2.8,, AM_PATH_GTK(1.2.8,,
AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.)) AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
dnl Quick hack to deny non GTK 1.2
if (expr $gtk_config_major_version \> 1) > /dev/null; then
AC_MSG_ERROR(GIMP does not work with versions of GTK > 1.2)
fi
if (expr $gtk_config_minor_version \> 2) > /dev/null; then
AC_MSG_ERROR(GIMP does not work with versions of GTK > 1.2)
fi
changequote(,)dnl changequote(,)dnl
dnl Evil stuff to extract GLIB stuff from gtk-config output dnl Evil stuff to extract GLIB stuff from gtk-config output
@ -254,6 +262,8 @@ dnl Test for libjpeg
AC_MSG_CHECKING([for jpeglib.h]) AC_MSG_CHECKING([for jpeglib.h])
AC_TRY_CPP( AC_TRY_CPP(
[#include <stdio.h> [#include <stdio.h>
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H
#undef PACKAGE #undef PACKAGE
#undef VERSION #undef VERSION
#include <jpeglib.h>], #include <jpeglib.h>],

View File

@ -475,11 +475,6 @@ run (gchar *name,
if ((gimp_drawable_is_rgb(drawable->id) || if ((gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) gimp_drawable_is_gray(drawable->id)))
{ {
/* Set the tile cache size */
gimp_tile_cache_ntiles (2 * (drawable->width +
gimp_tile_width () - 1) /
gimp_tile_width ());
/* Run! */ /* Run! */
bumpmap (); bumpmap ();
@ -513,6 +508,7 @@ bumpmap (void)
gint y; gint y;
gint progress; gint progress;
gint tmp; gint tmp;
gint drawable_tiles_per_row, bm_tiles_per_row;
#if 0 #if 0
g_print ("bumpmap: waiting... (pid %d)\n", getpid ()); g_print ("bumpmap: waiting... (pid %d)\n", getpid ());
@ -536,6 +532,17 @@ bumpmap (void)
bm_bpp = gimp_drawable_bpp (bm_drawable->id); bm_bpp = gimp_drawable_bpp (bm_drawable->id);
bm_has_alpha = gimp_drawable_has_alpha (bm_drawable->id); bm_has_alpha = gimp_drawable_has_alpha (bm_drawable->id);
/* Set the tile cache size */
/* Compute number of tiles needed for one row of the drawable */
drawable_tiles_per_row =
1
+ (sel_x2 + gimp_tile_width () - 1) / gimp_tile_width ()
- sel_x1 / gimp_tile_width ();
/* Compute number of tiles needed for one row of the bitmap */
bm_tiles_per_row = (bm_width + gimp_tile_width () - 1) / gimp_tile_width ();
/* Cache one row of source, destination and bitmap */
gimp_tile_cache_ntiles (bm_tiles_per_row + 2 * drawable_tiles_per_row);
/* Initialize offsets */ /* Initialize offsets */
tmp = bmvals.yofs + sel_y1; tmp = bmvals.yofs + sel_y1;
if (tmp < 0) if (tmp < 0)