source: util/configure.ac@ bdba3c

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

AM_CFLAGS thrown out as warnings are added to CFLAGS in configure-part. Huge changes to make mpi working with given environment variables MPICC and MPILIBS

  • Property mode set to 100644
File size: 2.8 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([CreateGaAs.c])
7AC_CONFIG_HEADER([config.h])
8
9AM_INIT_AUTOMAKE
10
11# Checks for programs.
12AC_PROG_AWK
13AC_PROG_CXX
14AC_PROG_CC
15AC_PATH_PROG([PERL],[perl])
16AM_MISSING_PROG([DOXYGEN], [doxygen])
17
18# Checks for libraries.
19AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found]))
20
21# Checks for header files.
22AC_HEADER_STDC
23AC_CHECK_HEADERS([stdlib.h string.h])
24
25# Checks for typedefs, structures, and compiler characteristics.
26AC_C_CONST
27AC_TYPE_SIZE_T
28
29# debugging info
30AC_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])
32if ! 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)
45else
46 dnl even without debugging we want some minimal info of something's utterly wrong
47 CFLAGS="$CFLAGS -Wall"
48 CXXFLAGS="$CXXFLAGS -Wall"
49fi
50
51# optimization level
52AC_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])
54if 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
66fi
67
68# Checks for library functions.
69AC_FUNC_MALLOC
70AC_FUNC_REALLOC
71# check for GNU Scientific Library
72#AC_CHECK_LIB(m,main)
73AC_CHECK_LIB(blas,main)
74AC_CHECK_LIB(gsl,main)
75
76# test suite
77AC_CONFIG_TESTDIR(tests)
78AC_CONFIG_FILES([tests/atlocal tests/Makefile])
79AC_CONFIG_FILES([tests/NanoCreator], [chmod +x tests/NanoCreator])
80
81AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr])
82AC_CONFIG_FILES([Makefile doc/Makefile])
83AC_CONFIG_FILES([CreateFromXYZ.sh dynamicANOVA.sh Nanotubes.pl ReSequenceDX.pl])
84AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.