From 49dbdd4940aa78021f4ba516f4edb632058262bf Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@fe.uni-lj.si> Date: Wed, 25 Jun 2014 09:44:48 +0000 Subject: [PATCH] Fixes bugs in creating IsakPrograms compatible image --- configure.ac | 42 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 38 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2c4ec30..8ba481f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,58 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.50]) +AC_PREREQ([2.67]) AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) -AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) - +AM_INIT_AUTOMAKE # Checks for programs. AC_PROG_CC # Checks for libraries. +# FIXME: Replace `main' with a function in `-lconfuse': +AC_CHECK_LIB([confuse], [cfg_parse]) +# FIXME: Replace `main' with a function in `-lm': +AC_CHECK_LIB([m], [pow]) +# Checks for libcairo + +## cairographics needs pkg-config +#AC_PATH_PROG(PKGCONF, pkg-config , [], +# [$PATH:/usr/local/bin:/ext/bin:/ext:/sw/bin:/opt/bin]) +AC_CHECK_HEADERS([cairo/cairo.h cairo/cairo-png.h]) +AC_CHECK_HEADERS([cairo.h cairo-png.h]) +AC_CHECK_LIB([cairo],[cairo_move_to]) +#PKG_CHECK_MODULES(CAIRO, cairo) +#AC_SUBST(CAIRO_CFLAGS) +#AC_SUBST(CAIRO_LIBS) + +AC_CHECK_LIB([gslcblas],[cblas_dgemm]) +AC_CHECK_LIB([gsl],[gsl_blas_dgemm]) # Checks for header files. -AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE + +dnl Check if we have enable debug support. +AC_MSG_CHECKING(whether to enable debugging) +debug_default="yes" +AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging +[default=$debug_default]],, enable_debug=$debug_default) +dnl Yes, shell scripts can be used +if test "x$enable_debug" = "xyes"; then +CFLAGS="-g -O2 -DDEBUG" +AC_MSG_RESULT(yes) +else +CFLAGS="-O3 -ffast-math" +AC_MSG_RESULT(no) +fi # Checks for library functions. AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([pow sqrt strndup]) AC_CONFIG_FILES([Makefile src/Makefile -- Gitblit v1.9.3