Trisurf Monte Carlo simulator
Samo Penic
2016-02-16 d0cafa2d67b4765450deb5781b08f4241d9c4d3a
commit | author | age
d7639a 1 #                                               -*- Autoconf -*-
SP 2 # Process this file with autoconf to produce a configure script.
3
aec47d 4 AC_PREREQ([2.67])
d7639a 5 AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
SP 6 AC_CONFIG_SRCDIR([config.h.in])
7 AC_CONFIG_HEADERS([config.h])
aec47d 8 AM_INIT_AUTOMAKE
d7639a 9 # Checks for programs.
SP 10 AC_PROG_CC
11
12 # Checks for libraries.
aec47d 13 # FIXME: Replace `main' with a function in `-lconfuse':
SP 14 AC_CHECK_LIB([confuse], [cfg_parse])
15 # FIXME: Replace `main' with a function in `-lm':
16 AC_CHECK_LIB([m], [pow])
d7639a 17
01d871 18 AC_CHECK_LIB([gslcblas],[cblas_dgemm])
SP 19 AC_CHECK_LIB([gsl],[gsl_blas_dgemm])
ee84bd 20 #AC_CHECK_LIB([xml2],[xmlNodeListGetString])
SP 21 PKG_CHECK_MODULES([libxml2], [libxml-2.0])
22721d 22 AC_CHECK_LIB([z],[deflate])
01d871 23
d7639a 24 # Checks for header files.
aec47d 25 AC_CHECK_HEADERS([stdlib.h string.h])
d7639a 26
SP 27 # Checks for typedefs, structures, and compiler characteristics.
aec47d 28 AC_C_INLINE
SP 29
30 dnl Check if we have enable debug support.
31 AC_MSG_CHECKING(whether to enable debugging)
32 debug_default="yes"
33 AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging
34 [default=$debug_default]],, enable_debug=$debug_default)
35 dnl Yes, shell scripts can be used
36 if test "x$enable_debug" = "xyes"; then
37 CFLAGS="-g -O2 -DDEBUG"
38 AC_MSG_RESULT(yes)
39 else
40 CFLAGS="-O3 -ffast-math"
41 AC_MSG_RESULT(no)
42 fi
d7639a 43
d0cafa 44 #detect commit version and date
SP 45 #-                   ["Trisurf $VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
46 #                   ["Trisurf (commit `cd $srcdir && git log -1 --format=format:%h`) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
47 AC_DEFINE_UNQUOTED(TS_VERSION,
48                     ["Trisurf (commit `git describe  --abbrev=6 --dirty --always --tags`) on `hostname`."],
49                     [A string containing the version number])
50
d7639a 51 # Checks for library functions.
SP 52 AC_FUNC_MALLOC
aec47d 53 AC_FUNC_REALLOC
SP 54 AC_CHECK_FUNCS([pow sqrt strndup])
d7639a 55
SP 56 AC_CONFIG_FILES([Makefile
57                  src/Makefile
58                  test/Makefile])
59 AC_OUTPUT