| 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 | AM_MISSING_PROG([DOXYGEN], [doxygen]) | 
|---|
| 16 |  | 
|---|
| 17 | # Checks for libraries. | 
|---|
| 18 | AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found])) | 
|---|
| 19 |  | 
|---|
| 20 | # Checks for header files. | 
|---|
| 21 | AC_HEADER_STDC | 
|---|
| 22 | AC_CHECK_HEADERS([stdlib.h string.h]) | 
|---|
| 23 |  | 
|---|
| 24 | # Checks for typedefs, structures, and compiler characteristics. | 
|---|
| 25 | AC_C_CONST | 
|---|
| 26 | AC_TYPE_SIZE_T | 
|---|
| 27 |  | 
|---|
| 28 | # debugging info | 
|---|
| 29 | AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Output debugging information, argument is yes or debugging level (default is no).]), | 
|---|
| 30 | [enable_debug=$enableval], [enable_debug=no]) | 
|---|
| 31 | if ! test x"$enable_debug" = xno; then | 
|---|
| 32 | if test x"${enable_debug}" = xyes; then | 
|---|
| 33 | CFLAGS="-g3" | 
|---|
| 34 | CXXFLAGS="-g3" | 
|---|
| 35 | else | 
|---|
| 36 | CFLAGS="-g${enable_debug}" | 
|---|
| 37 | CXXFLAGS="-g${enable_debug}" | 
|---|
| 38 | fi | 
|---|
| 39 | AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"]) | 
|---|
| 40 | AC_SUBST(HAVE_DEBUG) | 
|---|
| 41 | fi | 
|---|
| 42 |  | 
|---|
| 43 | # optimization level | 
|---|
| 44 | AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]), | 
|---|
| 45 | [enable_optimization=$enableval], [enable_optimization=yes]) | 
|---|
| 46 | if test ! x"$enable_optimization" = xno; then | 
|---|
| 47 | if test x"$enable_debug" = xno; then | 
|---|
| 48 | if test x"${enable_optimization}" = xyes; then | 
|---|
| 49 | CFLAGS="-O2" | 
|---|
| 50 | CXXFLAGS="-O2" | 
|---|
| 51 | else | 
|---|
| 52 | CFLAGS="-O${enable_optimization}" | 
|---|
| 53 | CXXFLAGS="-O${enable_optimization}" | 
|---|
| 54 | fi | 
|---|
| 55 | #       else | 
|---|
| 56 | #               AC_MSG_WARN(["Already specified --enable-debug!"]) | 
|---|
| 57 | fi | 
|---|
| 58 | fi | 
|---|
| 59 |  | 
|---|
| 60 | # Checks for library functions. | 
|---|
| 61 | AC_FUNC_MALLOC | 
|---|
| 62 | AC_FUNC_REALLOC | 
|---|
| 63 |  | 
|---|
| 64 | # test suite | 
|---|
| 65 | AC_CONFIG_TESTDIR(tests) | 
|---|
| 66 | AC_CONFIG_FILES([tests/atlocal tests/Makefile]) | 
|---|
| 67 | AC_CONFIG_FILES([tests/NanoCreator], [chmod +x tests/NanoCreator]) | 
|---|
| 68 |  | 
|---|
| 69 | AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr]) | 
|---|
| 70 | AC_CONFIG_FILES([Makefile doc/Makefile]) | 
|---|
| 71 | AC_CONFIG_FILES([CreateFromXYZ.sh dynamicANOVA.sh Nanotubes.pl ReSequenceDX.pl]) | 
|---|
| 72 | AC_OUTPUT | 
|---|