Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
spkg-configure.m4 for lcalc, and INCDIR rename
Browse files Browse the repository at this point in the history
the distros install headers into include/Lfunction,
so we make Sage consistent in this respect, and this
simplifies the whole thing a lot.
  • Loading branch information
dimpase committed Sep 3, 2019
1 parent ec86516 commit 567d9a0
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 30 deletions.
1 change: 1 addition & 0 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=63584e4da0b7b7c7a649da76c95dd60fec676adc
md5=539bc61c8fc49db4e2d9b5555a87203a
cksum=4072434824
2 changes: 1 addition & 1 deletion build/pkgs/lcalc/patches/Makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ index 84e4e88..5d263a6 100644
- cp -rf ../include $(INSTALL_DIR)/include/Lfunction
+ cp -f lcalc$(EXEEXT) $(INSTALL_DIR)/bin/.
+ cp -f libLfunction$(LIBEXT) $(INSTALL_DIR)/lib/.
+ cp -rf ../include $(INSTALL_DIR)/include/libLfunction
+ cp -rf ../include $(INSTALL_DIR)/include/Lfunction


SRCS = Lcommandline.cc Lcommandline_elliptic.cc Lcommandline_globals.cc Lcommandline_misc.cc Lcommandline_numbertheory.cc Lcommandline_twist.cc Lcommandline_values_zeros.cc Lgamma.cc Lglobals.cc Lmisc.cc Lriemannsiegel.cc Lriemannsiegel_blfi.cc cmdline.c
Expand Down
18 changes: 2 additions & 16 deletions build/pkgs/lcalc/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,12 @@ SAGE_SPKG_CONFIGURE([lcalc], [
lcalc_ver=`$LCALC --version 2>>/dev/null | $SED -e 's/lcalc\ //' | $SED -e 's/\ .*//g'`
AX_COMPARE_VERSION([$lcalc_ver], [ge], [$SAGE_LCALC_MINVER], [
AC_MSG_RESULT([yes.])
AC_CHECK_HEADERS([Lfunction/L.h libLfunction/L.h],
[AS_IF([test x$ac_cv_header_libLfunction_L_h = x],
[SAGE_LCALC_INCDIR_NOLIBPREFIX='yes'],
[SAGE_LCALC_INCDIR_NOLIBPREFIX=''])
sage_spkg_install_lcalc=no
break;],
[sage_spkg_install_lcalc=yes])
AC_CHECK_HEADER([Lfunction/L.h], [], [sage_spkg_install_lcalc=yes])
AC_MSG_CHECKING([whether we can link and run a program using libLfunction])
LCALC_SAVED_LIBS=$LIBS
LIBS="$LIBS -lLfunction"
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#ifdef HAVE_LFUNCTION_L_H
#include <Lfunction/L.h>
#else
#include <libLfunction/L.h>
#endif]],
AC_LANG_PROGRAM([[#include <Lfunction/L.h>]],
[[initialize_globals();
Complex x;
x = Pi*I;
Expand All @@ -41,8 +31,4 @@ SAGE_SPKG_CONFIGURE([lcalc], [
])
])
m4_popdef([SAGE_LCALC_MINVER])
], [], [], [
AS_IF([test x$sage_spkg_install_lcalc = xyes],
[AC_SUBST(SAGE_LCALC_INCDIR_NOLIBPREFIX,[''])],
[AC_SUBST(SAGE_LCALC_INCDIR_NOLIBPREFIX,[$SAGE_LCALC_INCDIR_NOLIBPREFIX])])
])
2 changes: 0 additions & 2 deletions src/bin/sage-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,3 @@ if [ -n "$SAGE_PKG_CONFIG_PATH" ]; then
# (Sage's pkgconf spkg takes care of this, if installed)
export PKG_CONFIG_PATH="$SAGE_PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi

export SAGE_LCALC_INCDIR_NOLIBPREFIX="@SAGE_LCALC_INCDIR_NOLIBPREFIX@"
5 changes: 0 additions & 5 deletions src/sage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ def cython_aliases():
'GSL_INCDIR',
'GSL_LIBDIR',
'GSL_LIBRARIES',
'LCALC_INCDIR_NOLIBPREFIX',
'LINBOX_CFLAGS',
'LINBOX_INCDIR',
'LINBOX_LIBDIR',
Expand Down Expand Up @@ -410,8 +409,4 @@ def cython_aliases():
# fflas-ffpack and fflas-ffpack does add such a C++11 flag.
aliases["LINBOX_CFLAGS"].append("-std=gnu++11")
aliases["ARB_LIBRARY"] = os.environ.get('SAGE_ARB_LIBRARY', 'arb')
if os.environ.get('SAGE_LCALC_INCDIR_NOLIBPREFIX', '') != '':
aliases["LCALC_INCDIR_NOLIBPREFIX"] = '-DLCALC_INCDIR_NOLIBPREFIX'
else:
aliases["LCALC_INCDIR_NOLIBPREFIX"] = '-DLCALC_INCDIR_YESLIBPREFIX'
return aliases
1 change: 0 additions & 1 deletion src/sage/libs/lcalc/lcalc_Lfunction.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# distutils: extra_compile_args = LCALC_INCDIR_NOLIBPREFIX
cdef extern from "lcalc_sage.h":
ctypedef struct doublevec "std::vector<double>":
int (*size)()
Expand Down
6 changes: 1 addition & 5 deletions src/sage/libs/lcalc/lcalc_sage.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#ifdef LCALC_INCDIR_NOLIBPREFIX
#include "Lfunction/L.h"
#else
#include "libLfunction/L.h"
#endif
#include "Lfunction/L.h"
int *new_ints(int l)
{
return new int[l];
Expand Down
2 changes: 2 additions & 0 deletions src/sage/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '8.9.beta9'
date = '2019-09-02'
banner = 'SageMath version 8.9.beta9, Release Date: 2019-09-02'

0 comments on commit 567d9a0

Please sign in to comment.