mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-16 18:38:28 +02:00
138 lines
2.5 KiB
Org Mode
138 lines
2.5 KiB
Org Mode
|
#+TITLE: QMCkl configuration
|
||
|
|
||
|
This files contains al the information to generate the files required
|
||
|
by Autotools to build the =configure= script for the library.
|
||
|
|
||
|
* Scripts analyzing source code
|
||
|
|
||
|
** Version of the library
|
||
|
|
||
|
#+NAME: version
|
||
|
#+BEGIN_SRC sh
|
||
|
echo 1.0
|
||
|
#+END_SRC
|
||
|
|
||
|
#+RESULTS: version
|
||
|
: 1.0
|
||
|
|
||
|
#+NAME: issues
|
||
|
#+BEGIN_SRC sh
|
||
|
echo "https://github.com/TREX-CoE/qmckl/issues"
|
||
|
#+END_SRC
|
||
|
|
||
|
#+RESULTS: issues
|
||
|
: https://github.com/TREX-CoE/qmckl/issues
|
||
|
|
||
|
#+NAME: website
|
||
|
#+BEGIN_SRC sh
|
||
|
echo "https://trex-coe.github.io/qmckl/index.html"
|
||
|
#+END_SRC
|
||
|
|
||
|
#+RESULTS: website
|
||
|
: https://trex-coe.github.io/qmckl/index.html
|
||
|
|
||
|
|
||
|
#+NAME: revision
|
||
|
#+BEGIN_SRC sh
|
||
|
git log --oneline | head -1
|
||
|
#+END_SRC
|
||
|
|
||
|
#+RESULTS: revision
|
||
|
: 5f2da3e Fixed website
|
||
|
|
||
|
** C Header files
|
||
|
|
||
|
#+NAME: headers
|
||
|
#+BEGIN_SRC sh :tangle no
|
||
|
#grep --regexp="\#include\\s+<.*>" --no-filename src/*.org \
|
||
|
grep --regexp="\#include\\s*<.*>" --no-filename src/*.org \
|
||
|
| sort \
|
||
|
| uniq \
|
||
|
| cut -d '<' -f 2 \
|
||
|
| cut -d '>' -f 1 \
|
||
|
| tr '\n' ' '
|
||
|
#+END_SRC
|
||
|
|
||
|
#+RESULTS: headers
|
||
|
: assert.h errno.h math.h stdint.h stdlib.h string.h
|
||
|
|
||
|
|
||
|
* configure.ac
|
||
|
|
||
|
** Initialization
|
||
|
|
||
|
#+BEGIN_SRC sh :noweb yes :tangle configure.ac
|
||
|
# This file was generated from the org-mode file configure.org
|
||
|
|
||
|
VERSION=[<<version()>>]
|
||
|
AC_SUBST([VERSION])
|
||
|
|
||
|
AC_REVISION([<<revision()>>])
|
||
|
AC_INIT([QMCkl],[<<version()>>],
|
||
|
[<<issues()>>], [],
|
||
|
[<<website()>>])
|
||
|
#+END_SRC
|
||
|
|
||
|
** Source files
|
||
|
#+BEGIN_SRC sh :noweb yes :tangle configure.ac
|
||
|
AC_CONFIG_SRCDIR([src/README.org])
|
||
|
#+END_SRC
|
||
|
|
||
|
** C Compiler
|
||
|
|
||
|
#+BEGIN_SRC sh :noweb yes :tangle configure.ac
|
||
|
AC_LANG_PUSH([C])
|
||
|
AC_PROG_CC
|
||
|
|
||
|
AC_CHECK_HEADERS([<<headers()>>])
|
||
|
#+END_SRC
|
||
|
|
||
|
** Fortran Compiler
|
||
|
|
||
|
#+BEGIN_SRC sh :noweb yes :tangle configure.ac
|
||
|
AC_PROG_FC([ifort gfortran flang],[Fortran])
|
||
|
AC_PROG_FC_C_O
|
||
|
AC_FC_SRCEXT([f90])
|
||
|
AC_FC_FREEFORM
|
||
|
#+END_SRC
|
||
|
|
||
|
** External libraries
|
||
|
|
||
|
#+BEGIN_SRC sh :tangle configure.ac
|
||
|
AC_CHECK_HEADER([munit/munit.h], [echo found], [echo not found] )
|
||
|
|
||
|
AC_CHECK_LIB([pthread], [pthread_create])
|
||
|
|
||
|
AC_SEARCH_LIBS([dgemm], [blas mkl],
|
||
|
[],
|
||
|
AC_MSG_ERROR([Unable to find a BLAS library])
|
||
|
])
|
||
|
#+END_SRC
|
||
|
|
||
|
** Makefile
|
||
|
|
||
|
#+BEGIN_SRC sh :tangle configure.ac
|
||
|
AC_CONFIG_FILES(Makefile)
|
||
|
#+END_SRC
|
||
|
|
||
|
** Library
|
||
|
|
||
|
#+BEGIN_SRC sh :tangle configure.ac
|
||
|
|
||
|
#+END_SRC
|
||
|
|
||
|
** Documentation
|
||
|
|
||
|
#+BEGIN_SRC sh :noweb yes :tangle configure.ac
|
||
|
AC_CHECK_PROGS([HAS_EMACS],[emacs],[])
|
||
|
#+END_SRC
|
||
|
|
||
|
** Finalization
|
||
|
|
||
|
#+BEGIN_SRC sh :tangle configure.ac
|
||
|
AC_OUTPUT
|
||
|
#+END_SRC
|
||
|
|
||
|
* Makefile.am
|
||
|
|