dnl  ......................................................................
dnl  ...  These are just some cheap tests to see if XRT libraries are 
dnl  ...  installed, so that Makefiles can be set to not build apps that 
dnl  ...  depend on XRT if XRT is not installed.  Note we define no macros
dnl  ...  here, we're just using the file to keep gunk out of configure.in.
dnl  ...  -- dwm@ans.net
dnl  ......................................................................

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/3d library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrt3d.a])
if test -f ${XRTHOME}/lib/libxrt3d.a ; then
  have_xrt3d="xrt3d"
  AC_MSG_RESULT([yes; have_xrt3d = $have_xrt3d])
else
  have_xrt3d="noxrt3d"
  AC_MSG_RESULT([no; have_xrt3d = $have_xrt3d])
fi
AC_SUBST(have_xrt3d)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/gear library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrtgear.a])
if test -f ${XRTHOME}/lib/libxrtgear.a ; then
  have_xrtgear="xrtgear"
  AC_MSG_RESULT([yes; have_xrtgear = $have_xrtgear])
else
  have_xrtgear="noxrtgear"
  AC_MSG_RESULT([no; have_xrtgear = $have_xrtgear])
fi
AC_SUBST(have_xrtgear)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/field library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrtfield.a])
if test -f ${XRTHOME}/lib/libxrtfield.a ; then
  have_xrtfield="xrtfield"
  AC_MSG_RESULT([yes; have_xrtfield = $have_xrtfield])  
else
  have_xrtfield="noxrtfield"
  AC_MSG_RESULT([no; have_xrtfield = $have_xrtfield])
fi
AC_SUBST(have_xrtfield)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/table library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrttable.a])
if test -f ${XRTHOME}/lib/libxrttable.a ; then
  have_xrttable="xrttable"
  AC_MSG_RESULT([yes; have_xrttable = $have_xrttable])
else
  have_xrttable="noxrttable"
  AC_MSG_RESULT([no; have_xrttable = $have_xrttable])
fi
AC_SUBST(have_xrttable)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/mvc kit library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrtmvc.a])
if test -f ${XRTHOME}/lib/libxrtmvc.a ; then
  have_xrtmvc="xrtmvc"
  AC_MSG_RESULT([yes; have_xrtmvc = $have_xrtmvc])
else
  have_xrtmvc="noxrtmvc"
  AC_MSG_RESULT([no; have_xrtmvc = $have_xrtmvc])
fi
AC_SUBST(have_xrtmvc)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/graph library
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for \$XRTHOME/lib/libxrtm.a])
if test -f ${XRTHOME}/lib/libxrtm.a ; then
  have_xrtgraph="xrtgraph"
  AC_MSG_RESULT([yes; have_xrtgraph = $have_xrtgraph])
else
  have_xrtgraph="noxrtgraph"
  AC_MSG_RESULT([no; have_xrtgraph = $have_xrtgraph])
fi
AC_SUBST(have_xrtgraph)

dnl  ----------------------------------------------------------------------
dnl  Check for XRT/PDS, which is a combination of all XRT widget
dnl  libraries.
dnl  ----------------------------------------------------------------------
AC_MSG_CHECKING([for XRT PDS])
if test "$have_xrtmvc" = "xrtmvc" -a "$have_xrttable" = "xrttable" -a \
        "$have_xrtfield" = "xrtfield" -a "$have_xrtgear" = "xrtgear" -a \
        "$have_xrt3d" = "xrt3d" -a "$have_xrtgraph" = "xrtgraph" ; then
  have_xrtpds="xrtpds"
  AC_MSG_RESULT([yes; have_xrtpds = $have_xrtpds])
else
  have_xrtpds="noxrtpds"
  AC_MSG_RESULT([no; have_xrtpds = $have_xrtpds])
fi
AC_SUBST(have_xrtpds)

