merge-requests/6/head
thierry1970 2022-06-14 08:49:04 +02:00
rodzic abad648617
commit e43c145dcb
4 zmienionych plików z 152 dodań i 1676 usunięć

396
aclocal.m4 vendored
Wyświetl plik

@ -12,402 +12,6 @@
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# Configure paths for GIMP-2.0
# Manish Singh, Sven Neumann
# Large parts shamelessly stolen from Owen Taylor
dnl AM_PATH_GIMP_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GIMP, and define GIMP_CFLAGS and GIMP_LIBS
dnl
AC_DEFUN([AM_PATH_GIMP_2_0],
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(gimptest, [ --disable-gimptest do not try to compile and run a test GIMP program],, enable_gimptest=yes)
pkg_name=gimp-2.0
pkg_config_args="$pkg_name gimpui-2.0"
no_gimp=""
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG != xno ; then
if pkg-config --atleast-pkgconfig-version 0.7 ; then
:
else
echo *** pkg-config too old; version 0.7 or better required.
no_gimp=yes
PKG_CONFIG=no
fi
else
no_gimp=yes
fi
min_gimp_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GIMP - version >= $min_gimp_version)
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GIMP found in PKG_CONFIG_PATH"
enable_gimptest=no
fi
if $PKG_CONFIG --atleast-version $min_gimp_version $pkg_config_args; then
:
else
no_gimp=yes
fi
fi
if test x"$no_gimp" = x ; then
GIMP_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
GIMP_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
GIMP_CFLAGS_NOUI=`$PKG_CONFIG $pkg_name --cflags`
GIMP_LIBS_NOUI=`$PKG_CONFIG $pkg_name --libs`
GIMP_DATA_DIR=`$PKG_CONFIG $pkg_name --variable=gimpdatadir`
GIMP_PLUGIN_DIR=`$PKG_CONFIG $pkg_name --variable=gimplibdir`
gimp_pkg_major_version=`$PKG_CONFIG --modversion $pkg_name | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gimp_pkg_minor_version=`$PKG_CONFIG --modversion $pkg_name | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gimp_pkg_micro_version=`$PKG_CONFIG --modversion $pkg_name | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gimptest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GIMP_CFLAGS"
LIBS="$GIMP_LIBS $LIBS"
dnl
dnl Now check if the installed GIMP is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent
dnl
rm -f conf.gimptest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <libgimp/gimp.h>
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
NULL, /* query_proc */
NULL /* run_proc */
};
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gimptest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gimp_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gimp_version");
exit(1);
}
if (($gimp_pkg_major_version > major) ||
(($gimp_pkg_major_version == major) && ($gimp_pkg_minor_version > minor)) ||
(($gimp_pkg_major_version == major) && ($gimp_pkg_minor_version == minor) && ($gimp_pkg_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'pkg-config --modversion %s' returned %d.%d.%d, but the minimum version\n", "$pkg_name", $gimp_pkg_major_version, $gimp_pkg_minor_version, $gimp_pkg_micro_version);
printf("*** of GIMP required is %d.%d.%d. If pkg-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct the correct configuration files\n");
return 1;
}
}
],, no_gimp=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gimp" = x ; then
AC_MSG_RESULT(yes (version $gimp_pkg_major_version.$gimp_pkg_minor_version.$gimp_pkg_micro_version))
ifelse([$2], , :, [$2])
else
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.gimptest ; then
:
else
echo "*** Could not run GIMP test program, checking why..."
CFLAGS="$CFLAGS $GIMP_CFLAGS"
LIBS="$LIBS $GIMP_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <libgimp/gimp.h>
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
NULL, /* query_proc */
NULL /* run_proc */
};
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GIMP or finding the wrong"
echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occurred. This usually means GIMP is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GIMP_CFLAGS=""
GIMP_LIBS=""
GIMP_CFLAGS_NOUI=""
GIMP_LIBS_NOUI=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GIMP_CFLAGS)
AC_SUBST(GIMP_LIBS)
AC_SUBST(GIMP_CFLAGS_NOUI)
AC_SUBST(GIMP_LIBS_NOUI)
AC_SUBST(GIMP_DATA_DIR)
AC_SUBST(GIMP_PLUGIN_DIR)
rm -f conf.gimptest
])
# Configure paths for GTK+
# Owen Taylor 1997-2001
# Version number used by aclocal, see `info automake Serials`.
# Increment on every change.
#serial 1
dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
dnl pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GTK_3_0],
[m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead])
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
, enable_gtktest=yes)
min_gtk_version=ifelse([$1], [], [3.0.0], [$1])
pkg_config_args="gtk+-3.0 >= $min_gtk_version"
for module in . $4
do
case "$module" in
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
esac
done
no_gtk=""
PKG_PROG_PKG_CONFIG([0.16])
if test -z "$PKG_CONFIG"; then
no_gtk=yes
fi
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
if test -n "$PKG_CONFIG"; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
enable_gtktest=no
fi
if $PKG_CONFIG $pkg_config_args; then
:
else
no_gtk=yes
fi
fi
if test x"$no_gtk" = x ; then
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
dnl
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
unsigned int major, minor, micro;
fclose (fopen ("conf.gtktest", "w"));
if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test -z "$PKG_CONFIG"; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://pkgconfig.sourceforge.net"
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK+ test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])
dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Tests for BACKEND-NAME in the GTK targets list
dnl
AC_DEFUN([GTK_CHECK_BACKEND],
[m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead])
pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
min_gtk_version=ifelse([$2],,3.0.0,$2)
pkg_config_args="$pkg_config_args >= $min_gtk_version"
PKG_PROG_PKG_CONFIG([0.16])
AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])])
if $PKG_CONFIG $pkg_config_args ; then
target_found=yes
else
target_found=no
fi
if test "x$target_found" = "xno"; then
ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
else
ifelse([$3],,[:],[$3])
fi
])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1)
dnl

1392
configure vendored

Plik diff jest za duży Load Diff

Wyświetl plik

@ -39,14 +39,8 @@ dnl Check for gimp plugin support
AC_MSG_CHECKING([whether GIMP plugin is requested])
dnl Default is enabled GIMP plugin
AC_ARG_ENABLE(gimp, [ --disable-gimp do not include GIMP plugin mode], USE_GIMP=$enableval, USE_GIMP=yes)
AC_ARG_ENABLE(gimp12, [ --enable-gimp12 include GIMP 1.2 plugin mode (this enables GIMP =< 1.2 plugin, defaults to GIMP 2.0)], USE_GIMP12=$enableval, USE_GIMP12="no")
if test "${USE_GIMP12}" = "yes"; then
AC_MSG_RESULT([yes, GIMP 1.2])
USE_GIMP="no"
USE_GTK3="no"
else
AC_MSG_RESULT([$USE_GIMP, GIMP 2.0])
fi
AC_MSG_RESULT([$USE_GIMP, GIMP 2.0])
dnl Checks for programs.
AC_PROG_CC
@ -131,34 +125,21 @@ if test "x${HAVE_SANE}" = "x"; then
exit
fi
# check for GTK3 or GTK2 >= 2.99.13
# check for GTK3
if test "${USE_GUI}" = "yes"; then
if test "${USE_GTK3}" = "yes" || test "${USE_GIMP}" = "yes"; then
AM_PATH_GTK_3_0(3.0.0, HAVE_GTK=yes, [
PKG_CHECK_MODULES([GTK], [gtk+-3.0], HAVE_GTK=yes, [
if test "${USE_GIMP}" = "yes"; then
AC_MSG_WARN([*** GIMP 2.0 plugin requested, but GTK+ 3.0 not found, falling back to GIMP/GTK+ < 3.0 if possible ***])
USE_GIMP=no
USE_GIMP12=yes
else
AC_MSG_WARN([*** GTK+ 3.0 not found, falling back to GTK+ < 3.0 if possible ***])
fi])
fi
# fallback to GTK < 3 if GTK3 isn't available
if test "${HAVE_GTK}" != "yes"; then
AM_PATH_GTK(2.99.13, HAVE_GTK=yes, )
fi
if test "${USE_GIMP12}" = "yes"; then
AM_PATH_GIMP(1.0.0, HAVE_GIMP=yes)
if test "${HAVE_GIMP}" = "yes"; then
AC_DEFINE([ENABLE_GIMP_1_2], 1, [Define to 1 if GIMP 1.2 support wanted])
fi
fi
if test "${USE_GIMP}" = "yes"; then
AM_PATH_GIMP_2_0(1.3.23, HAVE_GIMP=yes)
PKG_CHECK_MODULES([GIMP], [gimp-2.0], HAVE_GIMP=yes)
if test "${HAVE_GIMP}" = "yes"; then
AC_DEFINE([HAVE_LIBGIMP_GIMP_H], 1, [Define to 1 if you have the <libgimp/gimp.h> header file.])
fi
@ -178,11 +159,6 @@ if test "${USE_GUI}" = "yes"; then
BINPROGS=${BINPROGS}" "${GUIPROGS}
fi
fi
#PKG_CHECK_MODULES([GTK], [gtk+-3.0])
#PKG_CHECK_MODULES([GIMP], [gimp-2.0])
# /usr/lib/pkgconfig/gimp-2.0.pc
# /usr/lib/pkgconfig/gimpthumb-2.0.pc
# /usr/lib/pkgconfig/gimpui-2.0.pc
AC_DEFINE([HAVE_LIBGIMP_GIMP_H], 1, [Define to 1 if you have the <libgimp/gimp.h> header file.])

Wyświetl plik

@ -8,9 +8,6 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if GIMP 1.2 support wanted */
#undef ENABLE_GIMP_1_2
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
@ -39,9 +36,6 @@
/* Define to 1 if you have the <libc.h> header file. */
#undef HAVE_LIBC_H
/* Define to 1 if you have the <libgimp/gimpfeatures.h> header file. */
#undef HAVE_LIBGIMP_GIMPFEATURES_H
/* Define to 1 if you have the <libgimp/gimp.h> header file. */
#undef HAVE_LIBGIMP_GIMP_H