Changeset 1684c3 in git


Ignore:
Timestamp:
Nov 15, 2013, 5:09:41 PM (9 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
Children:
bbeddf73180e5a0b82609d4054f2cf3d3de40a27
Parents:
c6f0451f6fc744c2dac1401c4d9346c784f6b28b
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:09:41+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:17:40+01:00
Message:
Fix BS to use python-config

fix: more default python base-names
add: extra python compiler flags
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.am

    rc6f0451 r1684c3  
    1919GIT_VERSION := $(shell $(top_srcdir)/git-version-gen $(top_srcdir)/.tarball-git-version)
    2020
     21AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DHAVE_CONFIG_H  -DGIT_VERSION='"$(GIT_VERSION)"'
     22
    2123if ENABLE_FACTORY
    2224  USE_FACTORY = -L${top_builddir}/factory
     
    2527endif
    2628
    27 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DHAVE_CONFIG_H  -DGIT_VERSION='"$(GIT_VERSION)"'
     29if HAVE_GFANLIB
     30  USE_GFANLIB = ${top_builddir}/dyn_modules/callgfanlib/gfanlib.la ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}
     31else
     32  USE_GFANLIB =
     33endif
     34
    2835AM_LDFLAGS = -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel -L${top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/resources
    2936
     
    3542endif !ENABLE_P_PROCS_DYNAMIC
    3643
     44##########################################################################
     45module_LTLIBRARIES = pyobject.la
     46
     47pyobject_la_SOURCES = pyobject.cc
     48
     49pyobject_la_CXXFLAGS = $(PYTHON_CSPEC)
     50pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS)  ${AM_CPPFLAGS}
     51
     52pyobject_la_LDFLAGS = $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
     53###  -export-dynamic -shared -module -avoid-version (add to all DMs?)
     54
     55##########################################################################
    3756if PYTHON_USE
    38   PY=pyobject.la
     57  PY=pyobject.la  $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS)
    3958else !PYTHON_USE
    4059  PY=
     
    4261
    4362if SI_EMBED_PYTHON
    44   EMBED_PYOBJECT = ${PY} ${top_builddir}/dyn_modules/syzextra/syzextra.la
     63 EMBED_PYOBJECT   = ${PY} ${top_builddir}/dyn_modules/syzextra/syzextra.la ${USE_GFANLIB}
    4564else !SI_EMBED_PYTHON
    4665  EMBED_PYOBJECT =
    4766endif !SI_EMBED_PYTHON
    48 
    49 ##########################################################################
    50 module_LTLIBRARIES = pyobject.la
    51 
    52 pyobject_la_SOURCES = pyobject.cc
    53 
    54 pyobject_la_CXXFLAGS = $(PYTHON_CSPEC)
    55 pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS)  ${AM_CPPFLAGS}
    56 
    57 pyobject_la_LIBS    = $(PYTHON_EXTRA_LIBS)
    58 pyobject_la_LDFLAGS = ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) $(PYTHON_LSPEC) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    59 ###  -export-dynamic -shared -module -avoid-version (add to all DMs?)
    60 
    61 
    62 ########################### libSingular* #########################
    6367
    6468# if WANT_DEBUG
     
    206210
    207211# plural_cmd.inc
    208 nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc ${EMBED_PYOBJECT}
    209 # nodist_libSingular_g_la_SOURCES = iparith.inc
     212nodist_libSingular_la_SOURCES = feOpt.inc iparith.inc
    210213
    211214# -release ${PACKAGE_VERSION}
     
    279282# Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
    280283
    281 Singular_LDADD = libSingular.la
    282 
     284Singular_LDADD = libSingular.la ${EMBED_PYOBJECT}
     285
     286Singular_LDFLAGS = -static ${AM_LDFLAGS} ${EMBED_PYOBJECT}
    283287# Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lresources_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    284288
     
    288292# Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
    289293
    290 Singular_LDFLAGS = -static ${AM_LDFLAGS}
    291294# Singularg_LDFLAGS = -static ${AM_LDFLAGS}
    292295
     
    305308
    306309#  ${EMBED_PYOBJECT_LDFLAGS}  ${EMBED_PYOBJECT_LDFLAGS}
    307 Singulard_LDADD = libSingular.la
    308 
     310Singulard_LDADD = libSingular.la ${EMBED_PYOBJECT}
    309311# Singulardg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lresources_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    310312
     
    315317# Singulard_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
    316318
    317 Singulard_LDFLAGS = ${AM_LDFLAGS}
    318 # Singulardg_LDFLAGS = ${AM_LDFLAGS}
     319Singulard_LDFLAGS = ${AM_LDFLAGS} ${EMBED_PYOBJECT}
    319320
    320321
  • configure.ac

    rc6f0451 r1684c3  
    6666AC_CONFIG_GOOGLE_PERFTOOLS()
    6767
    68 AX_PYTHON_DEFAULT()
     68## AX_PYTHON_DEFAULT()
    6969AX_PYTHON_WITH_VERSION([2.4])
    7070
  • m4/ax_python.m4

    rc6f0451 r1684c3  
    5757[AC_MSG_CHECKING(for python build information)
    5858AC_MSG_RESULT([])
    59 for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
     59for python in python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2 python; do
    6060AC_CHECK_PROGS(PYTHON_BIN, [$python])
    6161ax_python_bin=$PYTHON_BIN
  • m4/ax_python_embed.m4

    rc6f0451 r1684c3  
    224224    if test -n "$PYTHON"
    225225    then
    226         ax_python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
     226        ax_python_prefix=`${PYTHON}-config --prefix`
    227227        if test -z "$ax_python_prefix"
    228228        then
    229229            AC_MSG_ERROR([Python Prefix is not known])
    230230        fi
    231         ax_python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
    232         ax_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`
    233         ax_python_includespec="-I${ax_python_prefix}/include/python${ax_python_version}"
    234         if test x"$python_prefix" != x"$python_execprefix"; then
    235             ax_python_execspec="-I${ax_python_execprefix}/include/python${ax_python_version}"
    236             ax_python_includespec="${ax_python_includespec} $ax_python_execspec"
    237         fi
    238         ax_python_ccshared=`${PYTHON} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('CFLAGSFORSHARED')"`
    239         ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}"
     231#        ax_python_execprefix=`${PYTHON}-config --exec-prefix`
     232#        ax_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`
     233#        ax_python_includespec="-I${ax_python_prefix}/include/python${ax_python_version}"
     234#        if test x"$python_prefix" != x"$python_execprefix"; then
     235#            ax_python_execspec="-I${ax_python_execprefix}/include/python${ax_python_version}"
     236#            ax_python_includespec="${ax_python_includespec} $ax_python_execspec"
     237#        fi
     238        ax_python_cspec=`${PYTHON}-config --cflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g' -e 's@ -mno-fused-madd@@g'`
     239        #   or -Qunused-arguments / clang :(
     240#        ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}"
    240241        AC_SUBST([PYTHON_CSPEC], [${ax_python_cspec}])
    241242        AC_MSG_NOTICE([PYTHON_CSPEC=${ax_python_cspec}])
     
    269270AC_DEFUN([AX_PYTHON_LSPEC],
    270271[
     272
    271273    AC_ARG_VAR( [PYTHON], [Python Executable Path] )
    272274    if test -n "$PYTHON"
    273275    then
     276
    274277        AX_PYTHON_RUN([
    275278import sys
     
    308311print strLinkSpec
    309312        ])
    310         AC_SUBST([PYTHON_LSPEC], [${ax_python_output}])
    311         AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}])
     313       
     314#        AC_SUBST([PYTHON_LSPEC], [${ax_python_output}])
     315#        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}])
     316
     317        ax_python_lspec=`${PYTHON}-config --ldflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g'`
     318        AC_SUBST([PYTHON_LSPEC], [${ax_python_lspec}])
     319        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_lspec}])
     320
    312321    fi
    313322])
  • m4/ax_python_with_version.m4

    rc6f0451 r1684c3  
    6868                AC_PATH_PROGS(
    6969                    [PYTHON],
    70                     [python2 python],
     70                    [python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2 python],
    7171                    [],
    7272                    $2
  • m4/flags.m4

    rc6f0451 r1684c3  
    105105  AX_APPEND_LINK_FLAGS(${DBGFLAGS})
    106106 fi
    107  
     107
     108 ## for clang: -Wunneeded-internal-declaration
     109
    108110 if test "x${ENABLE_OPTIMIZATION}" != xno; then
    109111  OPTFLAGS="-DOM_NDEBUG -DNDEBUG -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops"
    110112  #  -O3 - crashes gcc???!!! 
    111   # -fpermissive
     113  # -fpermissive  
    112114  AC_LANG_PUSH([C])
    113115  AX_APPEND_COMPILE_FLAGS(${OPTFLAGS}, [CFLAGS])
     
    124126 fi
    125127
     128 FLAGS2="-Qunused-arguments"
     129 AC_LANG_PUSH([C])
     130 AX_APPEND_COMPILE_FLAGS(${FLAGS2}, [CFLAGS])
     131 AC_LANG_POP([C])
     132 
     133 AC_LANG_PUSH([C++])
     134 AX_APPEND_COMPILE_FLAGS(${FLAGS2}, [CXXFLAGS])
     135 AC_LANG_POP([C++])
     136
     137 AX_APPEND_LINK_FLAGS(${FLAGS2})
     138
    126139# SING_SHOW_FLAGS([before PROG_C_CC])
    127140
Note: See TracChangeset for help on using the changeset viewer.