diff --git a/auxdir/x_ac_ncurses.m4 b/auxdir/x_ac_ncurses.m4
new file mode 100644
index 0000000000000000000000000000000000000000..32301c87c785c61d4f233b429fcdb99bb3b20444
--- /dev/null
+++ b/auxdir/x_ac_ncurses.m4
@@ -0,0 +1,28 @@
+##*****************************************************************************
+## $Id$
+##*****************************************************************************
+#  AUTHOR:
+#    Danny Auble <da@llnl.gov>
+#
+#  SYNOPSIS:
+#    X_AC_NCURSES
+#
+#  DESCRIPTION:
+#    Test for NCURSES or CURSES. If found define HAVE_BGL
+##*****************************************************************************
+
+
+AC_DEFUN([X_AC_NCURSES],
+[
+      AC_SUBST(NCURSES)
+      ncurses_dir=/usr/lib
+
+      # Search for "libncurses.a" in the directory
+      if test -z "$have_ncurses_ar" -a -f "$ncurses_dir/libncurses.a" ; then
+         have_ncurses_ar=yes
+         NCURSES="ncurses"
+      fi
+      if test -z "$have_ncurses_ar" -a -f "$ncurses_dir/libcurses.a" ; then
+         NCURSES="curses"
+      fi
+])