source: util/configure.ac@ 68cfd1

Last change on this file since 68cfd1 was ec4e84, checked in by Frederik Heber <heber@…>, 17 years ago

configure BUGFIX: GSL may be linked against cblas_... functions or just ..., this is fixed.

Before we checked for cblas_dnrm2. However, e.g. libgoto names it simply dnrm2. Hence, the blas functions are not found or slower (c)blas, or gsl(c)blas is used. Now, we simply check for dnrm2 functions in the list of libs first, if it fails, then for cblas_dnrm2. And finally, we test GSL functionality by checking for main(), which only works if a working blas lib has been found before.
Also, we removed AC_MSG_NOTICE about CFLAGS and others. However, the other for MPICC was left present.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(PCP_Utilities, 1.0, heber@ins.uni-bonn.de)
6AC_CONFIG_SRCDIR([src/CreateGaAs.c])
7AC_CONFIG_HEADER([config.h])
8
9AM_INIT_AUTOMAKE
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_CXX
14AC_PATH_PROG([PERL],[perl])
15AC_PATH_PROG([SHELL],[sh])
16AC_PROG_AWK
17AM_MISSING_PROG([DOXYGEN], [doxygen])
18
19AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[debugging level of compiler. Argument is yes or debugging level. (default is no)]),
20 [enable_debugging=$enableval], [enable_debugging=no])
21AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or optimization. (default is 2)]),
22 [enable_optimization=$enableval], [enable_optimization=2])
23AC_ARG_ENABLE([warnings], AS_HELP_STRING([--enable-warnings],[Output compiler warnings, argument is none, some or full (default is some).]),
24 [enable_warnings=$enableval], [enable_warnings=some])
25AC_SET_COMPILER_FLAGS([$enable_optimization], [$enable_debugging], [$enable_warnings])
26
27# Checks for header files.
28AC_HEADER_STDC
29AC_CHECK_HEADERS([stdlib.h string.h])
30
31# Checks for typedefs, structures, and compiler characteristics.
32AC_C_CONST
33AC_TYPE_SIZE_T
34
35# Checks for library functions.
36AC_FUNC_MALLOC
37AC_FUNC_REALLOC
38AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found]))
39# check for GNU Scientific Library
40AC_CHECK_HEADERS([gsl/gsl_blas.h])
41AC_SEARCH_LIBS(dnrm2, goto blas cblas gslblas gslcblas)
42AC_CHECK_LIB(gsl, main, [],
43 [AC_SEARCH_LIBS(cblas_dnrm2, blas cblas gslblas gslcblas)])
44AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
45
46#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
47
48# test suite
49AC_CONFIG_TESTDIR(tests)
50AC_CONFIG_FILES([tests/atlocal tests/Makefile])
51AC_CONFIG_FILES([tests/NanoCreator], [chmod +x tests/NanoCreator])
52
53AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr])
54AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])
55AC_CONFIG_FILES([src/Nanotubes.pl src/ReSequenceDX.pl src/BOSSMatcher.pl])
56AC_CONFIG_FILES([src/average_result.sh src/CalculateDensity.sh src/CalculateMass.sh src/config2xyz.sh src/convert2old.sh src/convertpdb.sh src/gather_all_results.sh src/gather_averaged_results.sh src/gather_result.sh src/grep_shielding.sh src/meas2pdb.sh src/AdaptiveANOVA.sh src/CreateFromXYZ.sh src/dynamicANOVA.sh src/SortByRings.sh])
57AC_OUTPUT
58
Note: See TracBrowser for help on using the repository browser.