Skip to content

Commit a6827d0

Browse files
committed
also try to find the library without pkg-config
1 parent 96aa7c8 commit a6827d0

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

build/pkgs/sirocco/spkg-configure.m4

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,28 @@ SAGE_SPKG_CONFIGURE([sirocco], [
33
PKG_CHECK_MODULES([libsirocco], [libsirocco >= 2.1.0], [
44
AC_MSG_RESULT([found libsirocco >= 2.1.0, will use installed version])
55
],[
6-
AC_MSG_RESULT([couldn't find libsirocco >= 2.1.0. It will be installed])
7-
sage_spkg_install_sirocco=yes
6+
AC_MSG_RESULT([couldn't find libsirocco >= 2.1.0. Trying to find an instance without pkg-config])
7+
AC_CHECK_HEADER([sirocco.h], [
8+
BACKUP_LIBS=${LIBS}
9+
LIBS="${LIBS} -lmpfr -lsirocco"
10+
AC_LINK_IFELSE([
11+
AC_LANG_PROGRAM(
12+
[[#include <sirocco.h>
13+
]], [[
14+
double tcoefs[]={-2.,2.};
15+
homotopyPath(2, tcoefs, 1., 0.);
16+
]])], [
17+
AC_MSG_RESULT([yes])
18+
], [
19+
AC_MSG_RESULT([no])
20+
sage_spkg_install_sirocco=yes
21+
], [
22+
dnl assume that the person running cross-compiling
23+
dnl knows what they are doing
24+
AC_MSG_RESULT([yes])
25+
])
26+
LIBS=${BACKUP_LIBS}
27+
], [sage_spkg_install_sirocco=yes])
828
])
929
])
1030
])

0 commit comments

Comments
 (0)