Commit 97cb7b6d authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

emptied

2002-09-05  Manish Singh  <yosh@gimp.org>

        * acinclude.m4: emptied

        * autogen.sh: support for automake version special casing, error
        out on aclocal failure.

        * m4compat/1.4/pysupport.m4
        * m4compat/1.6/pysupport.m4
        * configure.in
        * plug-ins/Makefile.am: pygimp autoconf support, just to get it
        some testing. We'll figure out policy later.
parent aeeaaee5
2002-09-05 Manish Singh <yosh@gimp.org>
* acinclude.m4: emptied
* autogen.sh: support for automake version special casing, error
out on aclocal failure.
* m4compat/1.4/pysupport.m4
* m4compat/1.6/pysupport.m4
* configure.in
* plug-ins/Makefile.am: pygimp autoconf support, just to get it
some testing. We'll figure out policy later.
2002-09-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c (crop_tool_crop_image): call
......
## Add your own autoconf macros here.
## Find the install dirs for the python installation.
## By James Henstridge
# serial 1
AC_DEFUN(AM_PATH_PYTHON,
[AC_CHECK_PROGS(PYTHON, python python1.5 python1.4 python1.3,no)
if test "$PYTHON" != no; then
AC_MSG_CHECKING([where .py files should go])
changequote(, )dnl
pythondir=`$PYTHON -c '
import sys
if sys.version[0] > "1" or sys.version[2] > "4":
print "%s/lib/python%s/site-packages" % (sys.prefix, sys.version[:3])
else:
print "%s/lib/python%s" % (sys.prefix, sys.version[:3])'`
changequote([, ])dnl
AC_MSG_RESULT($pythondir)
AC_MSG_CHECKING([where python extensions should go])
changequote(, )dnl
pyexecdir=`$PYTHON -c '
import sys
if sys.version[0] > "1" or sys.version[2] > "4":
print "%s/lib/python%s/site-packages" % (sys.exec_prefix, sys.version[:3])
else:
print "%s/lib/python%s/sharedmodules" % (sys.exec_prefix, sys.version[:3])'`
changequote([, ])dnl
AC_MSG_RESULT($pyexecdir)
else
# these defaults are version independent ...
AC_MSG_CHECKING([where .py files should go])
pythondir='$(prefix)/lib/site-python'
AC_MSG_RESULT($pythondir)
AC_MSG_CHECKING([where python extensions should go])
pyexecdir='$(exec_prefix)/lib/site-python'
AC_MSG_RESULT($pyexecdir)
fi
AC_SUBST(pythondir)
AC_SUBST(pyexecdir)])
## this one is commonly used with AM_PATH_PYTHONDIR ...
dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
dnl Check if a module containing a given symbol is visible to python.
AC_DEFUN(AM_CHECK_PYMOD,
[AC_REQUIRE([AM_PATH_PYTHON])
py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
ifelse([$2],[], [prog="
import sys
try:
import $1
except ImportError:
sys.exit(1)
except:
sys.exit(0)
sys.exit(0)"], [prog="
import $1
$1.$2"])
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
eval "py_cv_mod_$py_mod_var=yes"
else
eval "py_cv_mod_$py_mod_var=no"
fi
])
py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
if test "x$py_val" != xno; then
AC_MSG_RESULT(yes)
ifelse([$3], [],, [$3
])dnl
else
AC_MSG_RESULT(no)
ifelse([$4], [],, [$4
])dnl
fi
])
# serial 1
dnl finds information needed for compilation of shared library style python
dnl extensions. AM_PATH_PYTHON should be called before hand.
AC_DEFUN(AM_INIT_PYEXEC_MOD,
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING([for python headers])
AC_CACHE_VAL(am_cv_python_includes,
[changequote(,)dnl
am_cv_python_includes="`$PYTHON -c '
import sys
includepy = \"%s/include/python%s\" % (sys.prefix, sys.version[:3])
if sys.version[0] > \"1\" or sys.version[2] > \"4\":
libpl = \"%s/include/python%s\" % (sys.exec_prefix, sys.version[:3])
else:
libpl = \"%s/lib/python%s/config\" % (sys.exec_prefix, sys.version[:3])
print \"-I%s -I%s\" % (includepy, libpl)'`"
changequote([, ])])
PYTHON_INCLUDES="$am_cv_python_includes"
AC_MSG_RESULT(found)
AC_SUBST(PYTHON_INCLUDES)
AC_MSG_CHECKING([definitions from Python makefile])
AC_CACHE_VAL(am_cv_python_makefile,
[changequote(,)dnl
py_makefile="`$PYTHON -c '
import sys
print \"%s/lib/python%s/config/Makefile\"%(sys.exec_prefix, sys.version[:3])'`"
if test ! -f "$py_makefile"; then
AC_MSG_WARN([*** Couldn't find the python config makefile. Maybe you are
*** missing the development portion of the python installation])
am_cv_python_makefile=no
else
eval `sed -n \
-e "s/^CCSHARED=[ ]*\(.*\)/am_cv_python_CCSHARED='\1'/p" \
-e "s/^LDSHARED=[ ]*\(.*\)/am_cv_python_LDSHARED='\1'/p" \
-e "s/^SO=[ ]*\(.*\)/am_cv_python_SO='\1'/p" \
$py_makefile`
am_cv_python_makefile=found
fi
changequote([, ])])
AC_MSG_RESULT(done)
SO="$am_cv_python_SO"
PYTHON_CFLAGS="$am_cv_python_CCSHARED"
PYTHON_LINK="$am_cv_python_LDSHARED -o \[$]@"
AC_SUBST(SO)dnl
AC_SUBST(PYTHON_CFLAGS)dnl
AC_SUBST(PYTHON_LINK)])
......@@ -17,9 +17,12 @@ FILE=plug-ins
LIBTOOL_REQUIRED_VERSION=1.3.4
AUTOCONF_REQUIRED_VERSION=2.52
AUTOMAKE_REQUIRED_VERSION=1.4
AUTOMAKE16_REQUIRED_VERSION=1.6
GLIB_REQUIRED_VERSION=2.0.0
INTLTOOL_REQUIRED_VERSION=0.17
ACLOCAL_INTERNAL_FLAGS=
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
......@@ -72,14 +75,35 @@ else
fi
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
if (automake --version) < /dev/null > /dev/null 2>&1; then
if (automake-1.6 --version) < /dev/null > /dev/null 2>&1; then
VER=`automake-1.6 --version \
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOMAKE16_REQUIRED_VERSION
AUTOMAKE=automake-1.6
ACLOCAL=aclocal-1.6
ACLOCAL_INTERNAL_FLAGS="-I m4compat/1.6"
elif (automake --version) < /dev/null > /dev/null 2>&1; then
VER=`automake --version \
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOMAKE_REQUIRED_VERSION
AUTOMAKE=automake
ACLOCAL=aclocal
ACLOCAL_INTERNAL_FLAGS="-I m4compat/1.4"
echo
echo " You do not have automake 1.6."
echo " The $PROJECT build will work, but the python binding will not be there."
echo " Upgrade automake if you want this functionality."
echo
echo " NOTE: you will get warnings from plug-ins/pygimp/Makefile.am."
echo " This is normal."
echo
else
echo
echo " You must have automake installed to compile $PROJECT."
echo " Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.4p1.tar.gz"
echo " Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.3.tar.gz"
echo " (or a newer version if it is available)"
DIE=1
fi
......@@ -139,6 +163,8 @@ case $CC in
;;
esac
echo
if test -z "$ACLOCAL_FLAGS"; then
acdir=`aclocal --print-ac-dir`
......@@ -159,12 +185,15 @@ if test -z "$ACLOCAL_FLAGS"; then
done
fi
aclocal $ACLOCAL_FLAGS
if ! $ACLOCAL $ACLOCAL_INTERNAL_FLAGS $ACLOCAL_FLAGS; then
echo "$ACLOCAL gave errors. Please fix the error conditions and try again."
exit 1
fi
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
automake --add-missing $am_opt
$AUTOMAKE --add-missing $am_opt
autoconf
glib-gettextize --copy --force
......
......@@ -903,26 +903,26 @@ AC_SUBST(GIMP_PERL_PO)
##################
dnl Pygimp configure stuff ...
dnl AC_ARG_ENABLE(python,
dnl [ --disable-python do not build python extension],,[enable_python=no])
dnl build_python=false
dnl if test "x$enable_python" != xno; then
dnl AM_PATH_PYTHON
dnl if test "x$PYTHON" != xno; then
dnl AM_INIT_PYEXEC_MOD
dnl if test "x$am_cv_python_makefile" != xno; then
dnl PYGIMP_CFLAGS_NOUI="-I\$(top_srcdir) $GLIB_CFLAGS"
dnl PYGIMP_LIBS_NOUI="-L\$(top_builddir)/libgimp/.libs -lgimp $GLIB_LIBS"
dnl
dnl build_python=true
dnl AM_CHECK_PYMOD(gtk,,,build_python=false)
dnl fi
dnl fi
dnl fi
dnl AC_SUBST(PYGIMP_CFLAGS_NOUI)
dnl AC_SUBST(PYGIMP_LIBS_NOUI)
dnl AM_CONDITIONAL(BUILD_PYTHON, $build_python)
AC_ARG_ENABLE(python,
AC_HELP_STRING([--enable-python], [build python extension [by default disabled]]),,
[enable_python=no])
if test "x$enable_python" != xno; then
if test "x$am__api_version" != "x1.6"; then
AC_MSG_ERROR([Sorry, python support is disabled in this version])
fi
dnl check for Python
AM_PATH_PYTHON(2.2)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
dnl check for PyGTK
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 1.99.12)
AC_SUBST(PYGTK_CFLAGS)
fi
AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno)
####################################################
# Determine where to install the GNOME2 desktop file
......@@ -1071,6 +1071,13 @@ dnl plug-ins/perl/po/Makefile.in
dnl plug-ins/plugin-helper/Makefile
dnl plug-ins/tools/common/Makefile
if test "x$enable_python" != xno; then
AC_CONFIG_FILES([
plug-ins/pygimp/Makefile
plug-ins/pygimp/doc/Makefile
plug-ins/pygimp/plug-ins/Makefile])
fi
AC_OUTPUT([
build/Makefile
build/win32/Makefile
......
## Add your own autoconf macros here.
AC_DEFUN([AM_PATH_PYTHON],)
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],)
## Add your own autoconf macros here.
## Find the install dirs for the python installation.
## By James Henstridge
dnl a macro to check for ability to create python extensions
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_TRY_CPP([#include <Python.h>],dnl
[AC_MSG_RESULT(found)
$1],dnl
[AC_MSG_RESULT(not found)
$2])
CPPFLAGS="$save_CPPFLAGS"
])
......@@ -22,11 +22,9 @@ EXTRA_DIST = \
winsnap/winsnap.ico \
winsnap/winsnap.rc
## if BUILD_PYTHON
## pygimp=pygimp
## else
## pygimp=
## endif
if BUILD_PYTHON
pygimp=pygimp
endif
SUBDIRS = \
libgck \
......@@ -52,6 +50,7 @@ SUBDIRS = \
mosaic \
pagecurl \
$(PRINT) \
$(pygimp) \
rcm \
sgi \
sel2path \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment