-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
54 lines (54 loc) · 1.35 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([param.f90], [1], [[email protected]])
AC_CONFIG_SRCDIR([./src/fortlib])
#
AC_PREFIX_PROGRAM([gfortran])
AC_LANG([C])
AC_LANG([Fortran])
#
# Check Options
# debug options
AC_ARG_ENABLE([dbg],
[AC_HELP_STRING([--enable-dbg],
[Compile sources with DEBUG options])],
[dbg_flag="True"],
[dbg_flag="False"])
AC_SUBST([dbg_flag])
#
# Check Programs or BLAS
# gfortran
AC_PROG_CC
#
# gfortran
AC_PROG_FC([gfortran], [95])
#
# f2py
AC_CHECK_PROGS([F2PY],
[f2py],
[AC_MSG_ERROR([f2py was not found.])])
#
# blas
AC_CHECK_LIB(openblas, dgemm,
[blaslib="-lopenblas"],
[AC_CHECK_LIB(blas, dgemm,
[blaslib="-lblas"],
[AC_MSG_ERROR([blas was not found.])]
)]
)
AC_SUBST([blaslib])
#
# lapack
AC_CHECK_LIB(lapack, dgesv,
[lapacklib="-llapack"],
[AC_MSG_ERROR([lapack was not found.])]
)
AC_SUBST([lapacklib])
#
# Makefiles
AC_CONFIG_FILES([./makefile])
AC_CONFIG_FILES([./src/lbfgsb/makefile])
AC_CONFIG_FILES([./src/slsqp/makefile])
AC_CONFIG_FILES([./src/fortlib/makefile])
AC_CONFIG_FILES([./src/mfista/makefile])
AC_OUTPUT