1 | # -*- Autoconf -*-
|
---|
2 | # Process this file with autoconf to produce a configure script.
|
---|
3 |
|
---|
4 | AC_PREREQ(2.59)
|
---|
5 | AC_INIT(PCP_Utilities, 1.0, heber@ins.uni-bonn.de)
|
---|
6 | AC_CONFIG_SRCDIR([CreateGaAs.c])
|
---|
7 | AC_CONFIG_HEADER([config.h])
|
---|
8 |
|
---|
9 | AM_INIT_AUTOMAKE
|
---|
10 |
|
---|
11 | # Checks for programs.
|
---|
12 | AC_PROG_AWK
|
---|
13 | AC_PROG_CXX
|
---|
14 | AC_PROG_CC
|
---|
15 | AC_PATH_PROG([PERL],[perl])
|
---|
16 | AM_MISSING_PROG([DOXYGEN], [doxygen])
|
---|
17 |
|
---|
18 | # Checks for libraries.
|
---|
19 | AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found]))
|
---|
20 |
|
---|
21 | # Checks for header files.
|
---|
22 | AC_HEADER_STDC
|
---|
23 | AC_CHECK_HEADERS([stdlib.h string.h])
|
---|
24 |
|
---|
25 | # Checks for typedefs, structures, and compiler characteristics.
|
---|
26 | AC_C_CONST
|
---|
27 | AC_TYPE_SIZE_T
|
---|
28 |
|
---|
29 | # debugging info
|
---|
30 | AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Output debugging information, argument is yes or debugging level (default is no).]),
|
---|
31 | [enable_debug=$enableval], [enable_debug=no])
|
---|
32 | if ! test x"$enable_debug" = xno; then
|
---|
33 | if test x"${enable_debug}" = xyes; then
|
---|
34 | CFLAGS="$CFLAGS -g3"
|
---|
35 | CXXFLAGS="$CXXFLAGS -g3"
|
---|
36 | else
|
---|
37 | CFLAGS="$CFLAGS -g${enable_debug}"
|
---|
38 | CXXFLAGS="$CXXFLAGS -g${enable_debug}"
|
---|
39 | fi
|
---|
40 | dnl enable all warnings
|
---|
41 | CFLAGS="$CFLAGS -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wnested-externs -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
|
---|
42 | CXXFLAGS="$CXXFLAGS -Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
|
---|
43 | AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
|
---|
44 | AC_SUBST(HAVE_DEBUG)
|
---|
45 | else
|
---|
46 | dnl even without debugging we want some minimal info of something's utterly wrong
|
---|
47 | CFLAGS="$CFLAGS -Wall"
|
---|
48 | CXXFLAGS="$CXXFLAGS -Wall"
|
---|
49 | fi
|
---|
50 |
|
---|
51 | # optimization level
|
---|
52 | AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]),
|
---|
53 | [enable_optimization=$enableval], [enable_optimization=yes])
|
---|
54 | if test ! x"$enable_optimization" = xno; then
|
---|
55 | if test x"$enable_debug" = xno; then
|
---|
56 | if test x"${enable_optimization}" = xyes; then
|
---|
57 | CFLAGS="-O2"
|
---|
58 | CXXFLAGS="-O2"
|
---|
59 | else
|
---|
60 | CFLAGS="-O${enable_optimization}"
|
---|
61 | CXXFLAGS="-O${enable_optimization}"
|
---|
62 | fi
|
---|
63 | # else
|
---|
64 | # AC_MSG_WARN(["Already specified --enable-debug!"])
|
---|
65 | fi
|
---|
66 | fi
|
---|
67 |
|
---|
68 | # Checks for library functions.
|
---|
69 | AC_FUNC_MALLOC
|
---|
70 | AC_FUNC_REALLOC
|
---|
71 | # check for GNU Scientific Library
|
---|
72 | #AC_CHECK_LIB(m,main)
|
---|
73 | AC_CHECK_LIB(blas,main)
|
---|
74 | AC_CHECK_LIB(gsl,main)
|
---|
75 |
|
---|
76 | # test suite
|
---|
77 | AC_CONFIG_TESTDIR(tests)
|
---|
78 | AC_CONFIG_FILES([tests/atlocal tests/Makefile])
|
---|
79 | AC_CONFIG_FILES([tests/NanoCreator], [chmod +x tests/NanoCreator])
|
---|
80 |
|
---|
81 | AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr])
|
---|
82 | AC_CONFIG_FILES([Makefile doc/Makefile])
|
---|
83 | AC_CONFIG_FILES([CreateFromXYZ.sh dynamicANOVA.sh Nanotubes.pl ReSequenceDX.pl])
|
---|
84 | AC_OUTPUT
|
---|