|
|
For example, to add 'proc2d.C' to 'eman/src' directory. Here are what you need to add to src/Makefile.am:
AC_ARG_ENABLE(openmp, [ --enable-openmp enable OpenMP support [default=no]])
AC_ARG_WITH(openmp-includes, [ --with-openmp-inc=DIR OpenMP include files are in DIR])
AC_ARG_WITH(openmp-libraries,[ --with-openmp-lib=DIR OpenMP library files are in DIR])
if test "$enable_openmp" = "yes"; then
search_headerdir "OpenMP" "omp.h" 0 $with_openmp_inc
if test ! "X$found_incdir" = "X"; then
OPENMP_CXXFLAGS="-DOPENMP -I${found_incdir}"
if test ! $with_openmp_lib = "X"; then
openmp_libdir="-L$with_openmp_lib"
fi
OPENMP_LIB="$openmp_libdir -lmp"
else
AC_MSG_RESULT([WARNING: OpenMP support disabled])
fi
fi
# for SGI machine only
if test ! "$OPENMP_CXXFLAGS" = "X"; then
OPENMP_CXXFLAGS="-mp ${OPENMP_CXXFLAGS}"
fi
AC_SUBST(OPENMP_CXXFLAGS)
AC_SUBST(OPENMP_LIB)