File: configure.in

package info (click to toggle)
clisp 1%3A2.49.20210628.gitde01f0f-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 55,488 kB
  • sloc: lisp: 123,912; ansic: 76,710; xml: 27,403; sh: 10,447; fortran: 7,308; makefile: 1,453; perl: 164; sed: 13
file content (56 lines) | stat: -rw-r--r-- 1,600 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
dnl AUTOCONF configuration for PARI
dnl Copyright (C) 2004-2010, 2018 Sam Steingold <sds@gnu.org>
dnl This is Free Software, distributed under the GNU GPL v2+

AC_PREREQ([2.64])
AC_INIT(pari, 1.0, clisp-list)
AC_CONFIG_SRCDIR(pari.lisp)
AC_CONFIG_HEADERS(config.h)

RSE_BOLD
BOLD_MSG([PARI (Common)])
CL_MODULE_COMMON_CHECKS([ffi])

dnl Search for libpari and define LIBPARI, LTLIBPARI and INCPARI.
AC_LIB_LINKFLAGS([pari])

# https://stackoverflow.com/q/48283885/850781
AC_ARG_WITH([pari-datadir], [AS_HELP_STRING([--with-pari-datadir],
    [specify the PARI data directory explicitly (default: /usr/share/pari)])],
  [], [with_pari_datadir=''])
eval "datadir_expanded=${datadir}"
PARI_DATADIR=
for d in \
    ${with_pari_datadir} \
    ${LIBPARI_PREFIX:+${LIBPARI_PREFIX}/share/pari} \
    ${datadir_expanded}/pari \
    /usr/local/share/pari \
    /usr/share/pari
do
  AS_IF([test -r ${d}/pari.desc],[PARI_DATADIR="${d}"; break])
done

AS_IF([test x = "x$PARI_DATADIR"],
  [AC_MSG_ERROR(["Could not identify PARI data directory"])])
AC_SUBST([PARI_DATADIR])

BOLD_MSG([PARI (Headers)])
AC_CHECK_HEADERS(pari/pari.h)
if test "$ac_cv_header_pari_pari_h" = "no";
then AC_MSG_ERROR([cannot find PARI headers])
fi

BOLD_MSG([PARI (Functions)])
AC_LIB_APPENDTOVAR([LIBS], [-lm])
AC_LIB_APPENDTOVAR([LIBS], [$LIBPARI])
AC_SEARCH_LIBS(pari_kernel_init, pari)
if test "$ac_cv_search_pari_kernel_init" = "no";
then AC_MSG_ERROR([cannot find PARI library])
fi
AC_CHECK_FUNCS(pari_init pari_init_opts pari_close)

BOLD_MSG([PARI (Output)])
AC_CONFIG_FILES(Makefile link.sh)
AC_OUTPUT

BOLD_MSG([PARI (Done)])