binutils-gdb/gdb/python
Joel Brobecker ac534cba29 do not use python<version> subdir when including Python .h file
This is preparation work for being able to build GDB with Python
support on MinGW.

So far, the "python<version>" subdirectory needs to be specified
when including a Python header file.  In order to do that, we have
some special configury that tweaks the include path returned by
python-config.py such that the use of the subdirectory in the include
is necessary.  This was done in order to protect ourselves from
possible filename conflicts, since some of the filenames chosen by
Python were a little generic.

The problem is that this cannot work with a standard Python install
on MinGW systems.  On such systems, the .h files are located in
<python_prefix>/include.  So, in preparation for allowing us to build
GDB on MinGW with Python support enabled, this patch changes the
requirement to provide the "python<version>" subdirectory in the
include directive.

The positive consequence is that we no longer need to have a set
of #include directives for each version of Python, since the include
directive is now the same for all versions of Python.  However, the
downside is that we are losing the level of protection we were trying
to achieve by forcing the subdirectory in the include directive.
In order to reduce a bit the consequences of a possible conflict,
this patch also changes the location where the -I/path/to/python
switch goes, to be last in the list (suggested by Doug Evans).

One last change is the fact that we are now including Python.h
and all other Python include headers using angle brackets rather
than double-quotes.  This fixes a problem on case-insensitive
systems where #include "Python.h" causes our gdb/python/python.h
header to be included instead of Python's <Python.h> header.

gdb/ChangeLog:

	* configure.ac: Remove fallback behavior for building
	against Python.  Remove tweaking of Python include path.
	Add PYTHON_CPPFLAGS and PYTHON_LIBS substitution.
	(AC_TRY_LIBPYTHON):  Adjust program used in linking test.
	If link is successful, set PYTHON_CPPFLAGS and PYTHON_LIBS.
	Always restore CPPFLAGS and LIBS after linking test.
	* configure: Regenerated.
	* Makefile.in (INTERNAL_CPPFLAGS): Add @PYTHON_CPPFLAGS@.
	(INSTALLED_LIBS, CLIBS): Add @PYTHON_LIBS@.
	* python/python-internal.h: Adjust includes of Python .h files.
2011-01-31 04:41:27 +00:00
..
lib/gdb run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
py-auto-load.c 2011-01-05 Michael Snyder <msnyder@vmware.com> 2011-01-06 00:57:05 +00:00
py-block.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-breakpoint.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-cmd.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-frame.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-function.c run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
py-inferior.c run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
py-infthread.c gdb 2011-01-19 17:21:39 +00:00
py-lazy-string.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-objfile.c 2011-01-05 Michael Snyder <msnyder@vmware.com> 2011-01-06 00:57:05 +00:00
py-param.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-prettyprint.c gdb 2011-01-26 20:58:49 +00:00
py-progspace.c 2011-01-05 Michael Snyder <msnyder@vmware.com> 2011-01-06 00:57:05 +00:00
py-symbol.c 2011-01-05 Michael Snyder <msnyder@vmware.com> 2011-01-06 00:57:05 +00:00
py-symtab.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-type.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-utils.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
py-value.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
python-config.py Resync python-config.py with Python-2.7 version. 2010-07-08 22:12:44 +00:00
python-internal.h do not use python<version> subdir when including Python .h file 2011-01-31 04:41:27 +00:00
python.c * python/python.c (gdbpy_solib_name): Use gdb_py_longest and 2011-01-26 20:53:45 +00:00
python.h run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00