Changeset 02bc3c for util/configure.ac
- Timestamp:
- Jun 7, 2008, 1:16:19 PM (17 years ago)
- Children:
- 1f4209
- Parents:
- 79290f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util/configure.ac
r79290f r02bc3c 4 4 AC_PREREQ(2.59) 5 5 AC_INIT(PCP_Utilities, 1.0, heber@ins.uni-bonn.de) 6 AC_CONFIG_SRCDIR([ CreateGaAs.c])6 AC_CONFIG_SRCDIR([src/CreateGaAs.c]) 7 7 AC_CONFIG_HEADER([config.h]) 8 8 … … 10 10 11 11 # Checks for programs. 12 AC_PROG_CC 13 AC_PROG_CXX 14 AC_PATH_PROG([PERL],[perl]) 12 15 AC_PROG_AWK 13 AC_PROG_CXX14 AC_PROG_CC15 AC_PATH_PROG([PERL],[perl])16 16 AM_MISSING_PROG([DOXYGEN], [doxygen]) 17 17 18 # Checks for libraries. 19 AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found])) 18 AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[debugging level of compiler. Argument is yes or debugging level. (default is no)]), 19 [enable_debugging=$enableval], [enable_debugging=no]) 20 AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or optimization. (default is 2)]), 21 [enable_optimization=$enableval], [enable_optimization=2]) 22 AC_ARG_ENABLE([warnings], AS_HELP_STRING([--enable-warnings],[Output compiler warnings, argument is none, some or full (default is some).]), 23 [enable_warnings=$enableval], [enable_warnings=some]) 24 AC_SET_COMPILER_FLAGS([$enable_optimization], [$enable_debugging], [$enable_warnings]) 20 25 21 26 # Checks for header files. … … 27 32 AC_TYPE_SIZE_T 28 33 29 # debugging info30 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; then33 if test x"${enable_debug}" = xyes; then34 CFLAGS="$CFLAGS -g3"35 CXXFLAGS="$CXXFLAGS -g3"36 else37 CFLAGS="$CFLAGS -g${enable_debug}"38 CXXFLAGS="$CXXFLAGS -g${enable_debug}"39 fi40 dnl enable all warnings41 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 else46 dnl even without debugging we want some minimal info of something's utterly wrong47 CFLAGS="$CFLAGS -Wall"48 CXXFLAGS="$CXXFLAGS -Wall"49 fi50 51 # optimization level52 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; then55 if test x"$enable_debug" = xno; then56 if test x"${enable_optimization}" = xyes; then57 CFLAGS="-O2"58 CXXFLAGS="-O2"59 else60 CFLAGS="-O${enable_optimization}"61 CXXFLAGS="-O${enable_optimization}"62 fi63 # else64 # AC_MSG_WARN(["Already specified --enable-debug!"])65 fi66 fi67 68 34 # Checks for library functions. 69 35 AC_FUNC_MALLOC 70 36 AC_FUNC_REALLOC 37 AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found])) 71 38 # check for GNU Scientific Library 72 #AC_CHECK_LIB(m,main)73 39 AC_SEARCH_LIBS(cblas_sdot, blas cblas gslblas gslcblas) 74 40 AC_CHECK_LIB(gsl,main) 41 42 AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"]) 75 43 76 44 # test suite … … 80 48 81 49 AC_CHECK_FUNCS([pow sqrt strchr strrchr strstr]) 82 AC_CONFIG_FILES([Makefile doc/Makefile ])83 AC_CONFIG_FILES([ CreateFromXYZ.sh dynamicANOVA.sh Nanotubes.plReSequenceDX.pl])50 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile]) 51 AC_CONFIG_FILES([src/CreateFromXYZ.sh src/dynamicANOVA.sh src/Nanotubes.pl src/ReSequenceDX.pl]) 84 52 AC_OUTPUT
Note:
See TracChangeset
for help on using the changeset viewer.