diff --git a/ompi/debuggers/Makefile.am b/ompi/debuggers/Makefile.am index c23ec36182..c7e5765584 100644 --- a/ompi/debuggers/Makefile.am +++ b/ompi/debuggers/Makefile.am @@ -44,6 +44,7 @@ headers = \ msgq_interface.h ompi_msgq_dll_defs.h # Simple checks to ensure that the DSOs are functional +# This test is only built if we have libltdl support. dlopen_test_SOURCES = dlopen_test.c dlopen_test_CPPFLAGS = -I$(top_srcdir)/opal/libltdl diff --git a/ompi/debuggers/dlopen_test.c b/ompi/debuggers/dlopen_test.c index 029a4ee381..1cbbd79f58 100644 --- a/ompi/debuggers/dlopen_test.c +++ b/ompi/debuggers/dlopen_test.c @@ -15,19 +15,16 @@ #include "opal/libltdl/ltdl.h" -static int do_test(void); - +#if !OPAL_WANT_LIBLTDL int main(int argc, char *argv[]) { -#if OPAL_WANT_LIBLTDL - return do_test(); -#else /* If OPAL wasn't built with libltdl support, then skip this test */ fprintf(stderr, "OPAL was not built with libltdl support; skipping\n"); return 77; -#endif } +#else /* OPAL_WANT_LIBLTDL */ + static int do_test(void) { FILE *fp; @@ -128,3 +125,9 @@ static int do_test(void) return 2; } + +int main(int argc, char *argv[]) +{ + return do_test(); +} +#endif /* OPAL_WANT_LIBLTDL */