Changeset bdba3c


Ignore:
Timestamp:
May 30, 2008, 1:50:45 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
eefb8e
Parents:
ae0078
Message:

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

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/configure.ac

    rae0078 rbdba3c  
    3636# Checks for library functions.
    3737# check for GNU Scientific Library
    38 AC_CHECK_LIB(m,main)
    3938AC_CHECK_LIB(blas,main)
    4039AC_CHECK_LIB(gsl,main)
     
    4544if ! test x"$enable_debug" = xno; then
    4645        if test x"${enable_debug}" = xyes; then
    47                 CFLAGS="-g3"
    48                 CXXFLAGS="-g3"
     46                CFLAGS="$CFLAGS -g3"
     47                CXXFLAGS="$CXXFLAGS -g3"
    4948        else
    50                 CFLAGS="-g${enable_debug}"
    51                 CXXFLAGS="-g${enable_debug}"
     49                CFLAGS="$CFLAGS -g${enable_debug}"
     50                CXXFLAGS="$CXXFLAGS -g${enable_debug}"
    5251        fi
     52        dnl enable all warnings
     53        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"
     54        CXXFLAGS="$CXXFLAGS -Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
    5355  AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
    5456  AC_SUBST(HAVE_DEBUG)
     57else
     58        dnl even without debugging we want some minimal info of something's utterly wrong
     59        CFLAGS="$CFLAGS -Wall"
     60        CXXFLAGS="$CXXFLAGS -Wall"
    5561fi
    5662
     
    6167        if test x"$enable_debug" = xno; then
    6268                if test x"${enable_optimization}" = xyes; then
    63                         CFLAGS="-O2"
    64                         CXXFLAGS="-O2"
     69                        CFLAGS="$CFLAGS -O2"
     70                        CXXFLAGS="$CXXFLAGS -O2"
    6571                else
    66                         CFLAGS="-O${enable_optimization}"
    67                         CXXFLAGS="-O${enable_optimization}"
     72                        CFLAGS="$CFLAGS -O${enable_optimization}"
     73                        CXXFLAGS="$CXXFLAGS -O${enable_optimization}"
    6874                fi
    6975#       else
  • molecuilder/src/Makefile.am

    rae0078 rbdba3c  
    88joiner_SOURCES = joiner.cpp parser.cpp helpers.cpp verbose.cpp helpers.hpp parser.hpp datacreator.cpp datacreator.hpp
    99analyzer_SOURCES = analyzer.cpp parser.cpp datacreator.cpp helpers.cpp verbose.cpp helpers.hpp parser.hpp datacreator.hpp
    10 molecuilder_CXXFLAGS = -march=nocona -Wall -DBIGENDIAN=0
    11 joiner_CXXFLAGS = -march=nocona -Wall -DBIGENDIAN=0
    12 analyzer_CXXFLAGS = -march=nocona -Wall -DBIGENDIAN=0
    1310
    14 AM_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
    15 AM_CPPFLAGS = -Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self
    1611
    1712#EXTRA_DIST = ${molecuilder_DATA}
  • pcp/README

    rae0078 rbdba3c  
    2020==================
    2121
     22MPI
     23---
     24
     25In order to compile a parallel version an mpi package such as mpich is needed. If present there are two possibilities:
     261. Configure finds 'mpicc' which is basically just a link to gcc with includes, library paths and needed libs. Everything easy and fine.
     272. It does not, then you have to specify the paths by yourself by prepending the configure command as follows
     28                MPICC="gcc -I/path/to/mpi/installation/include" MPILIBS="-L/path/to/mpi/installation/lib -Wl,-rpath=/path/to/mpi/installation/lib" ./configure andsoon
     29         Note that MPILIBS will be suffixed to LDFLAGS and configure looks for an libmpich in the given dirs.
     30
    2231WINDOWS
    2332-------
  • pcp/configure.ac

    rae0078 rbdba3c  
    3838                         enable_mpi=no
    3939                 fi])
     40        if test x"$enable_mpi" = xyes; then
     41                AC_ARG_VAR([MPILIBS],[necessary libraries to link MPI C code])
     42                AC_ARG_VAR([MPICC],[necessary comnpiler for MPI C code])
     43                AC_ARG_VAR([MPICXX],[necessary comnpiler for MPI CPP code])
     44                #AM_CONDITIONAL([MPIVER], [test x"$enable_mpi" = xyes])
     45                AC_MSG_WARN(["MPICC: $MPICC, MPILIBS: $MPILIBS, MPIVER: $MPIVER, CC: $CC"])
     46                # if CC not set, set to MPICC
     47                if ! test x"$MPICC" = x; then
     48                        CC="$MPICC"
     49                fi
     50                if ! test x"$MPICXX" = x; then
     51                        CXX="$MPICXX"
     52                else
     53                        CXX="$MPICC"
     54                fi
     55                if ! test x"$MPILIBS" = x; then
     56                        LDFLAGS="$LDFLAGS $MPILIBS"
     57                        AC_CHECK_LIB(mpich, MPI_Allreduce, ,AC_MSG_ERROR([compatible mpich library not found]))
     58                fi
     59        fi
    4060else
    4161        AC_MSG_NOTICE([$disabled_msg])
    4262fi
    43 AC_ARG_VAR([MPILIBS],[necessary libraries to link MPI C code])
    44 AC_ARG_VAR([MPICC],[necessary comnpiler for MPI C code])
    45 AM_CONDITIONAL([MPIVER], [test x"$enable_mpi" = xyes])
    4663
    4764# Checks for typedefs, structures, and compiler characteristics.
     
    8198if ! test x"$enable_debug" = xno; then
    8299        if test x"${enable_debug}" = xyes; then
    83                 CFLAGS="-g3"
    84                 CXXFLAGS="-g3"
     100                CFLAGS="$CFLAGS -g3"
     101                CXXFLAGS="$CXXFLAGS -g3"
    85102        else
    86                 CFLAGS="-g${enable_debug}"
    87                 CXXFLAGS="-g${enable_debug}"
     103                CFLAGS="$CFLAGS -g${enable_debug}"
     104                CXXFLAGS="$CXXFLAGS -g${enable_debug}"
    88105        fi
     106        dnl enable all warnings
     107        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"
     108        CXXFLAGS="$CXXFLAGS -Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
    89109  AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
    90110  AC_SUBST(HAVE_DEBUG)
     111else
     112        dnl even without debugging we want some minimal info of something's utterly wrong
     113        CFLAGS="$CFLAGS -Wall"
     114        CXXFLAGS="$CXXFLAGS -Wall"
    91115fi
    92116
     
    94118AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]),
    95119              [enable_optimization=$enableval], [enable_optimization=yes])
    96 if test ! x"$enable_optimization" = xno; then
     120if ! test x"$enable_optimization" = xno; then
    97121        if test x"$enable_debug" = xno; then
    98122                if test x"${enable_optimization}" = xyes; then
    99                         CFLAGS="-O2"
    100                         CXXFLAGS="-O2"
     123                        CFLAGS="$CFLAGS -O2"
     124                        CXXFLAGS="$CXXFLAGS -O2"
    101125                else
    102                         CFLAGS="-O${enable_optimization}"
    103                         CXXFLAGS="-O${enable_optimization}"
    104                 fi
    105 #       else
    106 #               AC_MSG_WARN(["Already specified --enable-debug!"])
     126                        CFLAGS="$CFLAGS -O${enable_optimization}"
     127                        CXXFLAGS="$CXXFLAGS -O${enable_optimization}"
     128                fi
     129        #else
     130                #AC_MSG_WARN(["Already specified --enable-debug!"])
    107131        fi
    108132fi
  • pcp/src/Makefile.am

    rae0078 rbdba3c  
    55pcp_SOURCES = ${SOURCE} ${HEADER}
    66
    7 AM_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
  • util/Makefile.am

    rae0078 rbdba3c  
    3737bin_SCRIPTS = ${scripts}
    3838
    39 AM_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
  • util/configure.ac

    rae0078 rbdba3c  
    3232if ! test x"$enable_debug" = xno; then
    3333        if test x"${enable_debug}" = xyes; then
    34                 CFLAGS="-g3"
    35                 CXXFLAGS="-g3"
     34                CFLAGS="$CFLAGS -g3"
     35                CXXFLAGS="$CXXFLAGS -g3"
    3636        else
    37                 CFLAGS="-g${enable_debug}"
    38                 CXXFLAGS="-g${enable_debug}"
     37                CFLAGS="$CFLAGS -g${enable_debug}"
     38                CXXFLAGS="$CXXFLAGS -g${enable_debug}"
    3939        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"
    4043  AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
    4144  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"
    4249fi
    4350
Note: See TracChangeset for help on using the changeset viewer.