Changeset 285 for trunk/configure.ac


Ignore:
Timestamp:
Dec 13, 2011 6:44:57 AM (8 years ago)
Author:
kulshres
Message:

repair linking with openmp enabled colpack

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r250 r285  
    142142   adolc_safe_extern="no"])
    143143
     144AC_MSG_CHECKING(which flag to use to enable OpenMP)
     145AC_ARG_WITH(openmp-flag,
     146            [AS_HELP_STRING([--with-openmp-flag=FLAG],
     147                            [use FLAG to enable OpenMP at compile time [default=none]])],
     148            [ac_adolc_openmpflag=$withval
     149             msg_result=$withval
     150             AC_MSG_RESULT($ac_adolc_openmpflag)],
     151            [ac_adolc_openmpflag=""
     152             msg_result="none"
     153             AC_MSG_RESULT($ac_adolc_openmpflag)])
     154
     155
    144156# ADOL-C Sparse facility
    145157AC_MSG_CHECKING(whether to build sparse drivers)
     
    169181for dir in $dirlist ; do
    170182    unset ac_cv_header_ColPackHeaders_h
    171     COLPACK_CFLAGS="-I$colpack/$dir/../include"
     183    COLPACK_CFLAGS="$ac_adolc_openmpflag -I$colpack/$dir/../include"
    172184    COLPACK_LIBDIR="$colpack/$dir"
    173     COLPACK_LIBS="-L$COLPACK_LIBDIR -lColPack -Wl,-rpath,$COLPACK_LIBDIR"
     185    COLPACK_LIBS="$ac_adolc_openmpflag -L$COLPACK_LIBDIR -lColPack -Wl,-rpath,$COLPACK_LIBDIR"
    174186    save_CPPFLAGS="$CPPFLAGS"
    175187    save_LIBS="$LIBS"
     
    204216      colpack_incdir=`readlink -f $COLPACK_LIBDIR/../include`
    205217      if test -n $colpack_incdir ; then
    206          COLPACK_CFLAGS="-I$colpack_incdir"
     218         COLPACK_CFLAGS="$ac_adolc_openmpflag -I$colpack_incdir"
    207219      else
    208220         COLPACK_CFLAGS=""
    209221      fi
    210       COLPACK_LIBS="-L$COLPACK_LIBDIR -lColPack -Wl,-rpath,$COLPACK_LIBDIR"
     222      COLPACK_LIBS="$ac_adolc_openmpflag -L$COLPACK_LIBDIR -lColPack -Wl,-rpath,$COLPACK_LIBDIR"
    211223   else
    212224      COLPACK_CFLAGS=""
     
    233245        done
    234246        )
    235        COLPACK_LIBS=`find "$COLPACK_LIBDIR/.tmp" -name \*.lo -printf "%p "`
     247       COLPACK_LIBS="$ac_adolc_openmpflag `find "$COLPACK_LIBDIR/.tmp" -name \*.lo -printf "%p "` "
    236248   fi
    237249   sparse=yes
     
    281293
    282294# ADOL-C Compilation flags
    283 AC_MSG_CHECKING(which flag to use to enable OpenMP)
    284 AC_ARG_WITH(openmp-flag,
    285             [AS_HELP_STRING([--with-openmp-flag=FLAG],
    286                             [use FLAG to enable OpenMP at compile time [default=none]])],
    287             [ac_adolc_openmpflag=$withval
    288              msg_result=$withval
    289              AC_MSG_RESULT($ac_adolc_openmpflag)],
    290             [ac_adolc_openmpflag=""
    291              msg_result="none"
    292              AC_MSG_RESULT($ac_adolc_openmpflag)])
    293 
    294295AC_MSG_CHECKING(which CFLAGS to use)
    295296AC_ARG_WITH(cflags,
Note: See TracChangeset for help on using the changeset viewer.