mirror of git://gcc.gnu.org/git/gcc.git
re PR libstdc++/51368 (libstdc++ python pretty printers should use --with-python-dir just like libjava)
2012-02-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/51368 * acinclude.m4 (GLIBCXX_ENABLE_PYTHON): New. * configure.ac: Use it. * python/Makefile.am: Same. * configure: Regenerate. * python/Makefile.in: Regenerate. * Makefile.in: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * po/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com> From-SVN: r184282
This commit is contained in:
parent
6017aed304
commit
2a5d011c41
|
@ -1,3 +1,20 @@
|
|||
2012-02-15 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
PR libstdc++/51368
|
||||
* acinclude.m4 (GLIBCXX_ENABLE_PYTHON): New.
|
||||
* configure.ac: Use it.
|
||||
* python/Makefile.am: Same.
|
||||
* configure: Regenerate.
|
||||
* python/Makefile.in: Regenerate.
|
||||
* Makefile.in: Same.
|
||||
* doc/Makefile.in: Same.
|
||||
* include/Makefile.in: Same.
|
||||
* po/Makefile.in: Same.
|
||||
* src/Makefile.in: Same.
|
||||
* src/c++11/Makefile.in: Same.
|
||||
* src/c++98/Makefile.in: Same.
|
||||
* testsuite/Makefile.in: Same.
|
||||
|
||||
2012-02-14 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||
|
||||
* 30_threads/thread/native_handle/typesizes.cc: Do not run on cygwin.
|
||||
|
|
|
@ -264,6 +264,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -3543,6 +3543,27 @@ AC_DEFUN([GLIBCXX_CHECK_SYSCTL_HW_NCPU], [
|
|||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check to see if python pretty printing can be activated.
|
||||
dnl
|
||||
dnl --with-python-dir=dir
|
||||
dnl installs directory into $prefix/dir
|
||||
AC_DEFUN([GLIBCXX_ENABLE_PYTHON], [
|
||||
|
||||
AC_MSG_CHECKING([for custom python install directory])
|
||||
AC_ARG_WITH([python-dir],
|
||||
AS_HELP_STRING([--with-python-dir],
|
||||
[the location to install Python modules. This path is relative starting from the prefix.]),
|
||||
[with_python_dir=$withval], [with_python_dir="no"])
|
||||
AC_MSG_RESULT(${with_python_dir})
|
||||
|
||||
# Needed for installing Python modules during make install.
|
||||
python_mod_dir="${with_python_dir}"
|
||||
AC_SUBST(python_mod_dir)
|
||||
GLIBCXX_CONDITIONAL(ENABLE_PYTHONDIR, test $python_mod_dir != no)
|
||||
])
|
||||
|
||||
|
||||
# Macros from the top-level gcc directory.
|
||||
m4_include([../config/gc++filt.m4])
|
||||
m4_include([../config/tls.m4])
|
||||
|
|
|
@ -664,6 +664,9 @@ LIBICONV
|
|||
OPT_LDFLAGS
|
||||
SECTION_LDFLAGS
|
||||
GLIBCXX_LIBS
|
||||
ENABLE_PYTHONDIR_FALSE
|
||||
ENABLE_PYTHONDIR_TRUE
|
||||
python_mod_dir
|
||||
ENABLE_EXTERN_TEMPLATE_FALSE
|
||||
ENABLE_EXTERN_TEMPLATE_TRUE
|
||||
EXTRA_CXX_FLAGS
|
||||
|
@ -856,6 +859,7 @@ enable_libstdcxx_debug
|
|||
enable_cxx_flags
|
||||
enable_fully_dynamic_string
|
||||
enable_extern_template
|
||||
with_python_dir
|
||||
enable_libstdcxx_time
|
||||
enable_tls
|
||||
enable_rpath
|
||||
|
@ -1568,6 +1572,8 @@ Optional Packages:
|
|||
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-python-dir the location to install Python modules. This path is
|
||||
relative starting from the prefix.
|
||||
--with-gnu-ld assume the C compiler uses GNU ld default=no
|
||||
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
|
||||
--without-libiconv-prefix don't search for libiconv in includedir and libdir
|
||||
|
@ -11486,7 +11492,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11489 "configure"
|
||||
#line 11495 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11592,7 +11598,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11595 "configure"
|
||||
#line 11601 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -14950,7 +14956,7 @@ fi
|
|||
#
|
||||
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 14953 "configure"
|
||||
#line 14959 "configure"
|
||||
struct S { ~S(); };
|
||||
void bar();
|
||||
void foo()
|
||||
|
@ -15285,7 +15291,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
|
|||
# Fake what AC_TRY_COMPILE does.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15288 "configure"
|
||||
#line 15294 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef bool atomic_type;
|
||||
|
@ -15320,7 +15326,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15323 "configure"
|
||||
#line 15329 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef short atomic_type;
|
||||
|
@ -15355,7 +15361,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15358 "configure"
|
||||
#line 15364 "configure"
|
||||
int main()
|
||||
{
|
||||
// NB: _Atomic_word not necessarily int.
|
||||
|
@ -15391,7 +15397,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15394 "configure"
|
||||
#line 15400 "configure"
|
||||
int main()
|
||||
{
|
||||
typedef long long atomic_type;
|
||||
|
@ -15471,7 +15477,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
|
|||
# unnecessary for this test.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15474 "configure"
|
||||
#line 15480 "configure"
|
||||
int main()
|
||||
{
|
||||
_Decimal32 d1;
|
||||
|
@ -15513,7 +15519,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|||
# unnecessary for this test.
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15516 "configure"
|
||||
#line 15522 "configure"
|
||||
template<typename T1, typename T2>
|
||||
struct same
|
||||
{ typedef T2 type; };
|
||||
|
@ -15547,7 +15553,7 @@ $as_echo "$enable_int128" >&6; }
|
|||
rm -f conftest*
|
||||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 15550 "configure"
|
||||
#line 15556 "configure"
|
||||
template<typename T1, typename T2>
|
||||
struct same
|
||||
{ typedef T2 type; };
|
||||
|
@ -17240,6 +17246,26 @@ $as_echo "$enable_extern_template" >&6; }
|
|||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for custom python install directory" >&5
|
||||
$as_echo_n "checking for custom python install directory... " >&6; }
|
||||
|
||||
# Check whether --with-python-dir was given.
|
||||
if test "${with_python_dir+set}" = set; then :
|
||||
withval=$with_python_dir; with_python_dir=$withval
|
||||
else
|
||||
with_python_dir="no"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_python_dir}" >&5
|
||||
$as_echo "${with_python_dir}" >&6; }
|
||||
|
||||
# Needed for installing Python modules during make install.
|
||||
python_mod_dir="${with_python_dir}"
|
||||
|
||||
|
||||
|
||||
|
||||
# Checks for operating systems support that doesn't require linking.
|
||||
|
||||
|
||||
|
@ -66046,6 +66072,15 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if test $python_mod_dir != no; then
|
||||
ENABLE_PYTHONDIR_TRUE=
|
||||
ENABLE_PYTHONDIR_FALSE='#'
|
||||
else
|
||||
ENABLE_PYTHONDIR_TRUE='#'
|
||||
ENABLE_PYTHONDIR_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
if test $enable_symvers != no; then
|
||||
ENABLE_SYMVERS_TRUE=
|
||||
ENABLE_SYMVERS_FALSE='#'
|
||||
|
@ -66499,6 +66534,10 @@ if test -z "${ENABLE_EXTERN_TEMPLATE_TRUE}" && test -z "${ENABLE_EXTERN_TEMPLATE
|
|||
as_fn_error "conditional \"ENABLE_EXTERN_TEMPLATE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${ENABLE_PYTHONDIR_TRUE}" && test -z "${ENABLE_PYTHONDIR_FALSE}"; then
|
||||
as_fn_error "conditional \"ENABLE_PYTHONDIR\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${ENABLE_SYMVERS_TRUE}" && test -z "${ENABLE_SYMVERS_FALSE}"; then
|
||||
as_fn_error "conditional \"ENABLE_SYMVERS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
|
@ -130,6 +130,7 @@ GLIBCXX_ENABLE_PARALLEL([yes])
|
|||
GLIBCXX_ENABLE_CXX_FLAGS
|
||||
GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING([no])
|
||||
GLIBCXX_ENABLE_EXTERN_TEMPLATE([yes])
|
||||
GLIBCXX_ENABLE_PYTHON
|
||||
|
||||
# Checks for operating systems support that doesn't require linking.
|
||||
GLIBCXX_CHECK_MATH_PROTO
|
||||
|
|
|
@ -248,6 +248,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -238,6 +238,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -298,6 +298,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -238,6 +238,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Makefile for the python subdirectory of the GNU C++ Standard library.
|
||||
##
|
||||
## Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2009, 2012 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of the libstdc++ version 3 distribution.
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
@ -24,7 +24,11 @@
|
|||
include $(top_srcdir)/fragment.am
|
||||
|
||||
## Where to install the module code.
|
||||
if ENABLE_PYTHONDIR
|
||||
pythondir = $(prefix)/$(python_mod_dir)
|
||||
else
|
||||
pythondir = $(datadir)/gcc-$(gcc_version)/python
|
||||
endif
|
||||
|
||||
all-local: gdb.py
|
||||
|
||||
|
|
|
@ -262,6 +262,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
@ -297,7 +298,8 @@ WARN_CXXFLAGS = \
|
|||
|
||||
# -I/-D flags to pass when compiling.
|
||||
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
pythondir = $(datadir)/gcc-$(gcc_version)/python
|
||||
@ENABLE_PYTHONDIR_FALSE@pythondir = $(datadir)/gcc-$(gcc_version)/python
|
||||
@ENABLE_PYTHONDIR_TRUE@pythondir = $(prefix)/$(python_mod_dir)
|
||||
nobase_python_DATA = \
|
||||
libstdcxx/v6/printers.py \
|
||||
libstdcxx/v6/__init__.py \
|
||||
|
|
|
@ -289,6 +289,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -256,6 +256,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -275,6 +275,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
|
@ -238,6 +238,7 @@ port_specific_symbol_files = @port_specific_symbol_files@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
python_mod_dir = @python_mod_dir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
Loading…
Reference in New Issue