diff --git a/configure.ac b/configure.ac
index 18ddff97ff923c1a11a90ce942cb52fe0264f1e2..2ba08788b60e37f2f8cc0999957d8810f7342980 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,7 @@ if test $with_elan; then
     [], 
     [AC_MSG_ERROR([unable to find the Elan3 library needed for Elan support.])], 
   )
-  AC_CHECK_LIB(rms, rms_prgcreate, 
+  AC_CHECK_LIB(rmscall, rms_prgcreate, 
     [],
     [AC_MSG_ERROR([unable to find the RMS library needed for Elan support])],
   )
diff --git a/src/common/qsw.c b/src/common/qsw.c
index 5fcbdd1a04caab03fc3c0d29de2a80311a5e35a7..2ccff41f9dcd07ab964d2980e13278b36fd57890 100644
--- a/src/common/qsw.c
+++ b/src/common/qsw.c
@@ -538,7 +538,11 @@ void
 qsw_prog_fini(qsw_jobinfo_t jobinfo)
 {
 	if (jobinfo->j_ctx) {
+#if OLD_ELAN_DRIVER
 		_elan3_fini(jobinfo->j_ctx);
+#else
+		elan3_control_close(jobinfo->j_ctx);
+#endif
 		jobinfo->j_ctx = NULL;
 	}
 }
@@ -550,10 +554,14 @@ int
 qsw_prog_init(qsw_jobinfo_t jobinfo, uid_t uid)
 {
 	int err;
-
+#if OLD_ELAN_DRIVER
 	/* obtain an Elan context (not the same as a hardware context num!) */
 	if ((jobinfo->j_ctx = _elan3_init(0)) == NULL)
 		goto fail;
+#else
+	if ((jobinfo->j_ctx = elan3_control_open(0)) == NULL)
+		goto fail;
+#endif
 
 	/* associate this process and its children with prgnum */
 	if (rms_prgcreate(jobinfo->j_prognum, uid, 1) < 0)
@@ -605,7 +613,11 @@ qsw_getnodeid(void)
 
 	if (ctx) {
 		nodeid = ctx->devinfo.NodeId;
+#if OLD_ELAN_DRIVER
 		_elan3_fini(ctx);
+#else
+		elan3_control_close(ctx);
+#endif
 	}
 	return nodeid;
 }
diff --git a/src/test/runqsw.c b/src/test/runqsw.c
index 9ad5fba18965141b7b4df035886ee3bf10734a76..82acf2de6b0d3f0c20776b64c3e07a384fb99dbd 100644
--- a/src/test/runqsw.c
+++ b/src/test/runqsw.c
@@ -200,6 +200,10 @@ main(int argc, char *argv[])
 		usage();
 	if (nprocs == 0)
 		nprocs = 2;
+	if (nodeid < 0) {
+		fprintf(stderr, "runqsw: could not determine elan address\n");
+		exit(1);
+	}
 	while (optind < argc)
 		sprintf(cmdbuf + strlen(cmdbuf), "%s ", argv[optind++]);
 	cmdbuf[strlen(cmdbuf) - 1] = '\0';