The serial 7 of m4macros/ax_gcc_func_attribute.m4 has an issue that when
Wstrict-prototypes is used with gcc, the attribute detection always
fails even if the attribute is actually supported. In such case the fish
cache will never be constructed. It's fixed in serial 12 of the macro in
autoconf-archive and this change updates the one distributed with GIMP
to serial 12.
Rather than looking for pygobject-3.0 with pkg-config, run an actual
test in python, loading the 'gi' module.
I also added a version parameter making it possible to even check for a
required version of PyGObject, though it is currently unused (as I have
no idea if we have a minimum requirement for our plug-ins to work well).
This is an improvement of commit 8e938e0960 as I realized that we don't
need any development files, therefore I don't think that searching with
pkg-config was the right idea in our case.
Cf !84. We don't want to just replace the old path without versionned
python, because I assume it has been set for a reason. So there may be
machines with a versionned python path, others without. Let's test both
on Windows.
In particular, when header check fails, Python option is disabled.
Also let's use pkg-config to search for the Python include directory.
The reason is that include/python{version} is not always
true. On my system in particular, python3.7 was in `include/python3.7m`.
So far only libgimpbase is introspected. It just works though (I could
test that I could just run a plug-in which could access libgimpbase API
without any problem).
The g-ir-scanner call outputs a lot of warning but I won't care for
these right now.
The `introspection.m4` is taken straight from GEGL tree.
Older --enable-binreloc configure option had basically the same purpose
as the newer --enable-relocatable-bundle, though the old binreloc was
only used for gimpenv.c code.
As a consequence, commit 10ce702188 was still not working fine since
gimp_installation_directory_file() also need binreloc enabled (to be
actually relocatable).
Let's get rid of this whole mess, by implying we want binreloc code to
be used when --enable-relocatable-bundle is ON. We don't need the
m4macros anymore, since AM_BINRELOC was basically just checking that
`/proc/self/maps` was present. But anyway being present at compile time
does not mean it will be at runtime (nor the opposite). So this test is
not that useful. The binreloc code will anyway fallback gracefully to
the non-binreloc code (i.e. trying to use build-time install paths) if
the procfs is lacking at runtime.
Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.
Similarly let's use "python2" in the binfmt string for extension search.
(cherry picked from commit 03ea9cac54)
Commit e64e61ca58 requires the
AX_GCC_FUNC_ATTRIBUTE macro, which requires autoconf-archive, and
might be too new for some distros we want to support. Distribute
it ourselves.
Also, some fixes to the makefile and acinclude.m4
BUILD_EXEEXT was not properly set (config macro AX_PROG_CC_FOR_BUILD).
Apparently we need aclocal/automake version 1.13 or higher and to
distribute ax_prog_cc_for_build.m4 ourselves to benefit from a fix
released only in autoconf 2.69.
Thanks to Éric Hoffman for reporting and investigating on this.
Automake 1.13 apparently dates from 2012 and debian testing provides
a newer version (automake 1.15) so it should be ok to update it. Also
that's only a build dependency.
GIMP_DETECT_CFLAGS: pass -Werror to the compiler when checking for
flags, so the macro fails if passing a flag only warns but doesn't
cause the compiler to fail. Before, the compiler would warn about the
flag for each file compiled.
Also set ACLOCAL_AMFLAGS in the top-level Makefile.am and update
the .gitignore file in the m4macros directory. This fixes the build
from a fresh checkout for me. Please revert if it causes problems.
2006-02-19 Manish Singh <yosh@gimp.org>
* m4macros/binreloc.m4: introduce automake conditional USE_BINRELOC.
* app/Makefile.am: ... and use the above here, so that -rpath is only
specified when binreloc functionality is enabled. Fixes bug #331677.
2005-11-06 Sven Neumann <sven@gimp.org>
Added support for binary relocation by means of binreloc, largely
based on a patch by Hongli Lai:
* m4macros/Makefile.am
* m4macros/binreloc.m4: new file providing a macro to check for
binreloc support.
* acinclude.m4
* configure.in: use the macro.
* libgimpbase/Makefile.am
* libgimpbase/gimpreloc.[ch]: new files providing binreloc support
on Linux.
* libgimpbase/gimpenv.[ch]: use binreloc, provide a function to
initialize the environment machinery.
* libgimpbase/gimpbase.def: updated.
* app/Makefile.am: fiddle with the LDFLAGS for binreloc.
* app/main.c (main): gimp_env_init(FALSE).
* libgimp/gimp.c (gimp_main): gimp_env_init(TRUE).
2005-07-31 Manish Singh <yosh@gimp.org>
* acinclude.m4
* m4macros/Makefile.am
* m4macros/detectcflags.m4: new macro: GIMP_DETECT_CFLAGS; used
to detect which of a set of compiler options a compiler supports.
* configure.in: use the above for the altivec and -fno-strict-aliasing
flags. Also, use it to detect the presence of -mmmx and -msse, since
those are needed to compile even MMX/SSE assembly with gcc 4.0. Define
MMX/SSE_EXTRA_CFLAGS.
* app/composite/Makefile.am: compile each of the composite flavors
into their own library, so we can use automake's per-target CFLAGS.
Use MMX/SSE/ALTIVEC_EXTRA_CFLAGS in the appropriate places. Build
libappcomposite.a out of the resulting objects.
* app/composite/gimp-composite-3dnow.c
* app/composite/gimp-composite-altivec.c
* app/composite/gimp-composite-mmx.c
* app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-sse2.c
* app/composite/gimp-composite-vis.c
* app/composite/make-installer.py: move the _init functions into
the installers, so only actually mmx/sse/etc. code gets compiled
under the appropriate CFLAGS.
* app/composite/gimp-composite-3dnow-installer.c
* app/composite/gimp-composite-altivec-installer.c
* app/composite/gimp-composite-mmx-installer.c
* app/composite/gimp-composite-sse-installer.c
* app/composite/gimp-composite-sse2-installer.c
* app/composite/gimp-composite-vis-installer.c: regenerated.
* app/composite/gimp-composite.c: remove useless cpu-accel.h include.
2005-06-24 Manish Singh <yosh@gimp.org>
* acinclude.m4: split out into separate files...
* m4macros/alsa.m4
* m4macros/gimpprint.m4
* m4macros/gtk-doc.m4
* m4macros/pythondev.m4: ... and put them here.
* m4macros/Makefile.am: dist the above files.
2004-03-21 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): added run-time version
check and do the workaround for bug #136636 only if
the Gtk+ version is < 2.2.5.
* m4macros/gimp-2.0.m4: require gimp >= 2.0.0
2004-01-07 Sven Neumann <sven@gimp.org>
* gimp-1.3.pc.in
* gimpui-1.3.pc.in: don't use $VERSION because pkg-config and the
like don't like the 2.0pre version numbers. Instead create a
parseable version number from major, minor and micro version.
* m4macros/gimp-2.0.m4: check for 1.3.24 or newer.
2003-07-20 Sven Neumann <sven@gimp.org>
* configure.in: changed the gettext domain prefix to gimp20.
* m4macros/Makefile.am
* m4macros/gimp-1.4.m4: removed this file ...
* m4macros/gimp-2.0.m4: ... and readded it with a new name.
Changed the macro to AM_PATH_GIMP_2_0().
* configure.in: added --without-aa option as a way to work around
broken aalib installations.
* INSTALL: document --without-aa and --without-mng.
2001-11-29 Sven Neumann <sven@gimp.org>
* m4macros/gimp-1.4.m4: use gimptool-1.3.
* app/display/gimpdisplayshell.c
* app/gui/gui.c: cosmetic changes from Guillermo S. Romero.
* plug-ins/common/*.c
* plug-ins/script-fu/script-fu-scripts.c: applied patches from
Guillermo S. Romero that change the button ordering. I had to redo
some of the changes by hand since the patches didn't apply cleanly.
Hopefully got it all right...
2001-11-12 Michael Natterer <mitch@gimp.org>
* HACKING: small fix.
* configure.in: changed --disable-perl to --enable-perl because
it doesn't build properly at the moment.
* pixmaps/Makefile.am: removed stuff which is no longer there
from EXTRA_DIST.
* plug-ins/Makefile.am: put back the $(GIMP_PERL) line in SUBDIRS.
* app/widgets/gimpmenuitem.c. include "libgimpwidgets/gimpwidgets.h".
* data/Makefile.am
* data/brushes/Makefile.am
* data/gradients/Makefile.am
* data/palettes/Makefile.am
* data/patterns/Makefile.am: removed the old "files" hack and put
the stuff to EXTRA_DIST.
* app/Makefile.am
* app/base/Makefile.am
* app/core/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/paint-funcs/Makefile.am
* app/pdb/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* app/widgets/gimpmenuitem.c
* app/xcf/Makefile.am
* cursors/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am
* libgimpcolor/Makefile.am
* libgimpmath/Makefile.am
* libgimpwidgets/Makefile.am
* m4macros/Makefile.am
* themes/Makefile.am
* themes/Default/Makefile.am
* themes/Default/images/Makefile.am
* themes/Default/images/tools/Makefile.am: removed "files" target.
2001-08-28 Sven Neumann <sven@gimp.org>
* acinclude.m4: removed redefinitions of libtool macros. We use the
installed libtool now. If this breaks the build for your system,
upgrade libtool. If that does not help, let us know.
* ltconfig
* ltmain.sh: removed these files. Newer versions of libtool don't use
ltconfig and ltmain.sh is taken from your libtool installation.
* autogen.sh: check for presence of libtool.
* Makefile.am
* configure.in
* gimp-remote.1.in
* gimp.1.in
* gimprc.5.in: removed man-pages from toplevel dir ...
* docs/Makefile.am
* docs/gimp-remote.1.in
* docs/gimp.1.in
* docs/gimprc.5.in
* docs/gimptool-1.4.1.in: ... and added them back here.
* gimp-1.4.m4: removed from toplevel dir ...
* m4macros/Makefile.am
* m4macros/gimp-1.4.m4: ... and added it back here.