1
1

Clean up the TM configure macro. Original bug was that it didn't add -lpbs to

the component's LIBS if the library was found in the default search paths.
However, it would also add -Is for default search paths and other nasty things,
so it seemed best to convert it to the OMPI_CHECK_PACKAGE macro so that it
behaved like all the other packages out there.

This commit was SVN r8007.
Этот коммит содержится в:
Brian Barrett 2005-11-07 13:21:46 +00:00
родитель 288cdaf302
Коммит bc8e6300fd

Просмотреть файл

@ -25,31 +25,27 @@ AC_DEFUN([OMPI_CHECK_TM],[
[AC_HELP_STRING([--with-tm],
[Directory where the tm software is installed])])
AS_IF([test "$with_tm" = "no"],
[ompi_check_tm_hapy="no"],
[ompi_check_tm_happy="yes"
AS_IF([test ! -z "$with_tm" -a "$with_tm" != "yes"],
[ompi_check_tm_dir="$with_tm"],
[ompi_check_tm_dir=""])])
ompi_check_tm_save_CPPFLAGS="$CPPFLAGS"
ompi_check_tm_save_LDFLAGS="$LDFLAGS"
ompi_check_tm_save_LIBS="$LIBS"
AS_IF([test "$ompi_check_tm_happy" = "yes"],
[OMPI_CHECK_PACKAGE([$1],
[tm.h],
[pbs],
[tm_init],
[],
[$ompi_check_tm_dir],
[],
[ompi_check_tm_happy="yes"],
[ompi_check_tm_happy="no"])])
AS_IF([test ! -z "$with_tm"],
[CPPFLAGS="$CPPFLAGS -I$with_tm/include"
LDFLAGS="$LDFLAGS -L$with_tm/lib"])
AC_CHECK_HEADERS([tm.h],
[AC_CHECK_LIB([pbs],
[tm_init],
[ompi_check_tm_happy="yes"],
[ompi_check_tm_happy="no"])],
[ompi_check_tm_happy="no"])
CPPFLAGS="$ompi_check_tm_save_CPPFLAGS"
LDFLAGS="$ompi_check_tm_save_LDFLAGS"
LIBS="$ompi_check_tm_save_LIBS"
AS_IF([test "$ompi_check_tm_happy" = "yes"],
[AS_IF([test ! -z "$with_tm"],
[$1_CPPFLAGS="$$1_CPPFLAGS -I$with_tm/include"
$1_LDFLAGS="$$1_LDFLAGS -L$with_tm/lib"
$1_LIBS="$$1_LIBS -lpbs"])
$2],
[$3])
AS_IF([test "$ompi_check_tm_happy" = "yes"],
[$2],
[AS_IF([test ! -z "$with_tm" -a "$with_tm" != "no"],
[AC_MSG_ERROR([TM support requested but not found. Aborting])])
$3])
])