diff --git a/configure b/configure
index 0993d703ee5ea85045f8b8ea85440c56baab735f..ef4c93415efbb8577af1172653c7fc1d68ffee3b 100755
--- a/configure
+++ b/configure
@@ -29965,11 +29965,15 @@ fi
 
 ENABLE_MPI=`test x"$enable_mpi" = xyes && echo true || echo false`
 
+LIBRT=''
 
 if test -z "$USE_MPI_TRUE"; then :
-  LIBRT=
-   LIBS_save=$LIBS
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aio_suspend" >&5
+  ac_fn_c_check_decl "$LINENO" "_SX" "ac_cv_have_decl__SX" "$ac_includes_default"
+if test "x$ac_cv_have_decl__SX" = xyes; then :
+
+else
+  LIBS_save=$LIBS
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aio_suspend" >&5
 $as_echo_n "checking for library containing aio_suspend... " >&6; }
 if ${ac_cv_search_aio_suspend+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -30025,7 +30029,9 @@ if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBRT=$ac_res
 fi
 
-   LIBS=$LIBS_save
+      LIBS=$LIBS_save
+fi
+
 fi
 #  ----------------------------------------------------------------------
 #  Create the Fortran Interface via iso_c_binding module (Fortran 2003 Standard)
diff --git a/configure.ac b/configure.ac
index 96c64c31e460606d305b6ec67d68386b43f962f5..07085eb9bdd10b4d7558584d5488f8dd3d400ddf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,13 +284,13 @@ AM_CONDITIONAL([USE_PPM_CORE],[test $enable_ppm = yes])
 AM_CONDITIONAL([HAVE_PARALLEL_NC4],[test $HAVE_PARALLEL_NC4 -gt 0])
 AC_SUBST([USE_MPI])
 AC_SUBST([ENABLE_MPI],[`test x"$enable_mpi" = xyes && echo true || echo false`])
-AC_SUBST([LIBRT])
+AC_SUBST([LIBRT], [''])
 AM_COND_IF([USE_MPI],
-  [LIBRT=
-   LIBS_save=$LIBS
-   AC_SEARCH_LIBS([aio_suspend], [rt],
-     [test "$ac_res" = "none required" || LIBRT=$ac_res])
-   LIBS=$LIBS_save])
+  [AC_CHECK_DECL([_SX], [],
+     [LIBS_save=$LIBS
+      AC_SEARCH_LIBS([aio_suspend], [rt],
+        [test "$ac_res" = "none required" || LIBRT=$ac_res])
+      LIBS=$LIBS_save])])
 #  ----------------------------------------------------------------------
 #  Create the Fortran Interface via iso_c_binding module (Fortran 2003 Standard)
 #
diff --git a/examples/pio/Makefile.am b/examples/pio/Makefile.am
index 82f232df7a853f2ec7325990e497572ec8c2ae58..ed3a4db6610b6050b557fc0d6d7b17238a06ad20 100644
--- a/examples/pio/Makefile.am
+++ b/examples/pio/Makefile.am
@@ -16,8 +16,8 @@ endif
 collectData_SOURCES=collectData.c
 
 if USE_MPI
-LDADD=$(top_builddir)/src/libcdipio.la $(LIBRT) $(MPI_C_LIB)
-collectData2003_LDADD=$(top_builddir)/src/libcdipio.la $(LIBRT) $(MPI_FC_LIB)
+LDADD=$(top_builddir)/src/libcdipio.la $(MPI_C_LIB)
+collectData2003_LDADD=$(top_builddir)/src/libcdipio.la $(MPI_FC_LIB)
 else
 LDADD=$(top_builddir)/src/libcdi.la
 collectData2003_LDADD=$(top_builddir)/src/libcdi.la
diff --git a/examples/pio/Makefile.in b/examples/pio/Makefile.in
index 852624f9056c26b759e2a6dcf19eec5f863a13b0..fb621ce9f5cca2abbe3fd0231be09ff17980a5f9 100644
--- a/examples/pio/Makefile.in
+++ b/examples/pio/Makefile.in
@@ -139,7 +139,7 @@ am__DEPENDENCIES_1 =
 @USE_MPI_FALSE@	$(top_builddir)/src/libcdi.la
 @USE_MPI_TRUE@collectData_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -150,7 +150,7 @@ collectData2003_OBJECTS = $(am_collectData2003_OBJECTS)
 @USE_MPI_FALSE@	$(top_builddir)/src/libcdi.la
 @USE_MPI_TRUE@collectData2003_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
 am_collectDataNStreams_OBJECTS = collectDataNStreams.$(OBJEXT)
 collectDataNStreams_OBJECTS = $(am_collectDataNStreams_OBJECTS)
 collectDataNStreams_LDADD = $(LDADD)
@@ -158,7 +158,7 @@ collectDataNStreams_LDADD = $(LDADD)
 @USE_MPI_FALSE@	$(top_builddir)/src/libcdi.la
 @USE_MPI_TRUE@collectDataNStreams_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
 am_compareResourcesArray_OBJECTS = compareResourcesArray.$(OBJEXT)
 compareResourcesArray_OBJECTS = $(am_compareResourcesArray_OBJECTS)
 compareResourcesArray_LDADD = $(LDADD)
@@ -166,7 +166,7 @@ compareResourcesArray_LDADD = $(LDADD)
 @USE_MPI_FALSE@	$(top_builddir)/src/libcdi.la
 @USE_MPI_TRUE@compareResourcesArray_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -447,9 +447,9 @@ AM_FCFLAGS = $(FPP_INCOPT)$(top_srcdir)/src $(MPI_FC_INCLUDE) \
 AM_CFLAGS = $(MPI_C_INCLUDE)
 collectData_SOURCES = collectData.c
 @USE_MPI_FALSE@LDADD = $(top_builddir)/src/libcdi.la
-@USE_MPI_TRUE@LDADD = $(top_builddir)/src/libcdipio.la $(LIBRT) $(MPI_C_LIB)
+@USE_MPI_TRUE@LDADD = $(top_builddir)/src/libcdipio.la $(MPI_C_LIB)
 @USE_MPI_FALSE@collectData2003_LDADD = $(top_builddir)/src/libcdi.la
-@USE_MPI_TRUE@collectData2003_LDADD = $(top_builddir)/src/libcdipio.la $(LIBRT) $(MPI_FC_LIB)
+@USE_MPI_TRUE@collectData2003_LDADD = $(top_builddir)/src/libcdipio.la $(MPI_FC_LIB)
 collectData2003_SOURCES = collectData2003.F90
 collectDataNStreams_SOURCES = collectDataNStreams.c
 compareResourcesArray_SOURCES = compareResourcesArray.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 9c240f82c7346046c3f9b1b0faee15613bb19153..25ea43c26cf8529a71e0190b8cd607a150bfeca8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -245,7 +245,7 @@ libcdipio_la_SOURCES += $(libcdipio_la_HAVE_PARALLEL_NC4_extra_sources)
 endif
 endif
 
-libcdipio_la_LIBADD    = libcdi.la $(PPM_CORE_LIBS) $(YAXT_LIBS) $(MPI_C_LIB)
+libcdipio_la_LIBADD    = libcdi.la $(LIBRT) $(PPM_CORE_LIBS) $(YAXT_LIBS) $(MPI_C_LIB)
 
 libcdi_la_LIBADD    = $(UUID_C_LIB)
 #
diff --git a/src/Makefile.in b/src/Makefile.in
index 876f56330a6de405b06c2fc64f3c6c83f7c8d408..1a801f31ca925edc03055e68ba0f6e7001e7303c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -248,7 +248,8 @@ libcdi_f2003_la_OBJECTS = $(am_libcdi_f2003_la_OBJECTS)
 @CREATE_ISOC_TRUE@@ENABLE_CDI_LIB_TRUE@am_libcdi_f2003_la_rpath =  \
 @CREATE_ISOC_TRUE@@ENABLE_CDI_LIB_TRUE@	-rpath $(libdir)
 libcdipio_la_DEPENDENCIES = libcdi.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am__libcdipio_la_SOURCES_DIST = cdipio.h cdipioFortran.c cfortran.h \
 	pio.c pio.h pio_comm.c pio_comm.h pio_conf.c pio_conf.h \
 	pio_dbuffer.c pio_id_set.h pio_impl.h pio_interface.c \
@@ -660,7 +661,7 @@ libcdipio_la_SOURCES = cdipio.h cdipioFortran.c cfortran.h pio.c pio.h \
 libcdipio_la_HAVE_PARALLEL_NC4_extra_sources = \
 	pio_cdf_int.c
 
-libcdipio_la_LIBADD = libcdi.la $(PPM_CORE_LIBS) $(YAXT_LIBS) $(MPI_C_LIB)
+libcdipio_la_LIBADD = libcdi.la $(LIBRT) $(PPM_CORE_LIBS) $(YAXT_LIBS) $(MPI_C_LIB)
 libcdi_la_LIBADD = $(UUID_C_LIB)
 #
 #cdilib.c:
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 77b66d22f4e8fdb30865ae6d9349d2b5b3d1ae28..5e9053f30518666e830fae05fb06ccd5f4546599 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,8 +45,8 @@ test_byteswap_SOURCES = test_byteswap.c
 #
 AM_CFLAGS = $(PPM_CORE_CFLAGS) $(YAXT_CFLAGS) $(MPI_C_INCLUDE)
 if USE_MPI
-pio_write_LDADD = ../src/libcdipio.la $(LIBRT) $(UUID_C_LIB) $(MPI_C_LIB)
-pio_write_deco2d_LDADD = ../src/libcdipio.la $(LIBRT) $(UUID_C_LIB) $(MPI_C_LIB)
+pio_write_LDADD = ../src/libcdipio.la $(UUID_C_LIB) $(MPI_C_LIB)
+pio_write_deco2d_LDADD = ../src/libcdipio.la $(UUID_C_LIB) $(MPI_C_LIB)
 TESTS +=  test_resource_copy_mpi_run
 check_PROGRAMS += test_resource_copy_mpi
 test_resource_copy_mpi_LDADD = ../src/libcdipio.la $(UUID_C_LIB)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 59ef4050f28f91e3c50e87ec9a4a03b871440a59..8cde7664ff9b6a68180a396b576c986cc955bb9e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -180,16 +180,14 @@ pio_write_OBJECTS = $(am_pio_write_OBJECTS)
 am__DEPENDENCIES_1 =
 @USE_MPI_FALSE@pio_write_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1)
 @USE_MPI_TRUE@pio_write_DEPENDENCIES = ../src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_pio_write_deco2d_OBJECTS = pio_write.$(OBJEXT) \
 	deco2d_model.$(OBJEXT) simple_model_helper.$(OBJEXT)
 pio_write_deco2d_OBJECTS = $(am_pio_write_deco2d_OBJECTS)
 @USE_MPI_FALSE@pio_write_deco2d_DEPENDENCIES = $(LDADD) \
 @USE_MPI_FALSE@	$(am__DEPENDENCIES_1)
 @USE_MPI_TRUE@pio_write_deco2d_DEPENDENCIES = ../src/libcdipio.la \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@USE_MPI_TRUE@	$(am__DEPENDENCIES_1)
+@USE_MPI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_test_byteswap_OBJECTS = test_byteswap.$(OBJEXT)
 test_byteswap_OBJECTS = $(am_test_byteswap_OBJECTS)
 test_byteswap_LDADD = $(LDADD)
@@ -560,9 +558,9 @@ test_byteswap_SOURCES = test_byteswap.c
 #
 AM_CFLAGS = $(PPM_CORE_CFLAGS) $(YAXT_CFLAGS) $(MPI_C_INCLUDE)
 @USE_MPI_FALSE@pio_write_LDADD = $(LDADD) $(UUID_C_LIB)
-@USE_MPI_TRUE@pio_write_LDADD = ../src/libcdipio.la $(LIBRT) $(UUID_C_LIB) $(MPI_C_LIB)
+@USE_MPI_TRUE@pio_write_LDADD = ../src/libcdipio.la $(UUID_C_LIB) $(MPI_C_LIB)
 @USE_MPI_FALSE@pio_write_deco2d_LDADD = $(LDADD) $(UUID_C_LIB)
-@USE_MPI_TRUE@pio_write_deco2d_LDADD = ../src/libcdipio.la $(LIBRT) $(UUID_C_LIB) $(MPI_C_LIB)
+@USE_MPI_TRUE@pio_write_deco2d_LDADD = ../src/libcdipio.la $(UUID_C_LIB) $(MPI_C_LIB)
 @USE_MPI_FALSE@test_resource_copy_mpi_LDADD = $(LDADD) $(UUID_C_LIB)
 @USE_MPI_TRUE@test_resource_copy_mpi_LDADD = ../src/libcdipio.la $(UUID_C_LIB)
 @USE_MPI_TRUE@test_resource_copy_mpi_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \