| 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]) |
| 7d44c8 | 5 | AC_INIT([trisurf_ng], [1.0], [samo.penic@fe.uni-lj.si]) |
| d7639a | 6 | AC_CONFIG_SRCDIR([config.h.in]) |
| SP | 7 | AC_CONFIG_HEADERS([config.h]) |
| aec47d | 8 | AM_INIT_AUTOMAKE |
| d7639a | 9 | # Checks for programs. |
| SP | 10 | AC_PROG_CC |
| 7d44c8 | 11 | LT_INIT |
| 815f19 | 12 | AC_PROG_LIBTOOL |
| d7639a | 13 | # Checks for libraries. |
| aec47d | 14 | # FIXME: Replace `main' with a function in `-lconfuse': |
| SP | 15 | AC_CHECK_LIB([confuse], [cfg_parse]) |
| 16 | # FIXME: Replace `main' with a function in `-lm': | |
| 17 | AC_CHECK_LIB([m], [pow]) | |
| d7639a | 18 | |
| 01d871 | 19 | AC_CHECK_LIB([gslcblas],[cblas_dgemm]) |
| SP | 20 | AC_CHECK_LIB([gsl],[gsl_blas_dgemm]) |
| ee84bd | 21 | #AC_CHECK_LIB([xml2],[xmlNodeListGetString]) |
| SP | 22 | PKG_CHECK_MODULES([libxml2], [libxml-2.0]) |
| 22721d | 23 | AC_CHECK_LIB([z],[deflate]) |
| 01d871 | 24 | |
| d7639a | 25 | # Checks for header files. |
| aec47d | 26 | AC_CHECK_HEADERS([stdlib.h string.h]) |
| d7639a | 27 | |
| SP | 28 | # Checks for typedefs, structures, and compiler characteristics. |
| aec47d | 29 | AC_C_INLINE |
| SP | 30 | |
| 31 | dnl Check if we have enable debug support. | |
| 32 | AC_MSG_CHECKING(whether to enable debugging) | |
| 815f19 | 33 | debug_default="no" |
| aec47d | 34 | AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging |
| SP | 35 | [default=$debug_default]],, enable_debug=$debug_default) |
| 36 | dnl Yes, shell scripts can be used | |
| 37 | if test "x$enable_debug" = "xyes"; then | |
| 38 | CFLAGS="-g -O2 -DDEBUG" | |
| 39 | AC_MSG_RESULT(yes) | |
| 40 | else | |
| 41 | CFLAGS="-O3 -ffast-math" | |
| 42 | AC_MSG_RESULT(no) | |
| 43 | fi | |
| d7639a | 44 | |
| e29756 | 45 | #AC_DEFINE_UNQUOTED(TS_VERSION, |
| SP | 46 | # ["Trisurf (commit `git describe --abbrev=6 --dirty --always --tags`) build on `date` @`hostname`."], |
| 47 | # [A string containing the version number]) | |
| d0cafa | 48 | |
| d7639a | 49 | # Checks for library functions. |
| SP | 50 | AC_FUNC_MALLOC |
| aec47d | 51 | AC_FUNC_REALLOC |
| SP | 52 | AC_CHECK_FUNCS([pow sqrt strndup]) |
| d7639a | 53 | |
| SP | 54 | AC_CONFIG_FILES([Makefile |
| 24cf44 | 55 | src/Makefile]) |
| d7639a | 56 | AC_OUTPUT |