[a0bcf1] | 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
|
---|
[e9c14d] | 15 | AC_PATH_PROG([PERL],[perl])
|
---|
[a0bcf1] | 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 |
|
---|
[da83f8] | 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="-g3"
|
---|
| 35 | CXXFLAGS="-g3"
|
---|
| 36 | else
|
---|
| 37 | CFLAGS="-g${enable_debug}"
|
---|
| 38 | CXXFLAGS="-g${enable_debug}"
|
---|
| 39 | fi
|
---|
| 40 | AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
|
---|
| 41 | AC_SUBST(HAVE_DEBUG)
|
---|
| 42 | fi
|
---|
| 43 |
|
---|
| 44 | # optimization level
|
---|
| 45 | AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]),
|
---|
| 46 | [enable_optimization=$enableval], [enable_optimization=yes])
|
---|
| 47 | if test ! x"$enable_optimization" = xno; then
|
---|
| 48 | if test x"$enable_debug" = xno; then
|
---|
| 49 | if test x"${enable_optimization}" = xyes; then
|
---|
| 50 | CFLAGS="-O2"
|
---|
| 51 | CXXFLAGS="-O2"
|
---|
| 52 | else
|
---|
| 53 | CFLAGS="-O${enable_optimization}"
|
---|
| 54 | CXXFLAGS="-O${enable_optimization}"
|
---|
| 55 | fi
|
---|
[bd7b85] | 56 | # else
|
---|
| 57 | # AC_MSG_WARN(["Already specified --enable-debug!"])
|
---|
[da83f8] | 58 | fi
|
---|
| 59 | fi
|
---|
| 60 |
|
---|
[a0bcf1] | 61 | # Checks for library functions.
|
---|
| 62 | AC_FUNC_MALLOC
|
---|
| 63 | AC_FUNC_REALLOC
|
---|
[b5279f0] | 64 |
|
---|
| 65 | # test suite
|
---|
| 66 | AC_CONFIG_TESTDIR(tests)
|
---|
| 67 | AC_CONFIG_FILES([tests/atlocal tests/Makefile])
|
---|
[dac5c5] | 68 | AC_CONFIG_FILES([tests/NanoCreator], [chmod +x tests/NanoCreator])
|
---|
[b5279f0] | 69 |
|
---|
[a0bcf1] | 70 | AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr])
|
---|
[464c6d] | 71 | AC_CONFIG_FILES([Makefile doc/Makefile])
|
---|
| 72 | AC_CONFIG_FILES([CreateFromXYZ.sh dynamicANOVA.sh Nanotubes.pl ReSequenceDX.pl])
|
---|
[a0bcf1] | 73 | AC_OUTPUT
|
---|