- AC_CHECKING(for the Athena widgets)
-
- dnl What in heck did the user actually want?
- case "$with_athena" in
- dnl This is the default, old fashioned flat Athena.
- "xaw" | "") athena_variant=Xaw athena_3d=no ;;
- "3d") athena_variant=Xaw3d athena_3d=yes ;;
- "next") athena_variant=neXtaw athena_3d=yes ;;
- "95") athena_variant=Xaw95 athena_3d=yes ;;
- "xpm") athena_variant=XawXpm athena_3d=yes ;;
- *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;;
- esac
-
- dnl Search for the Athena library...
- if test "$athena_3d" = "no"; then
- AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
- [
- dnl Must not be a 3d library...
- AC_CHECK_LIB($athena_variant, threeDClassRec,
- AC_MSG_WARN("Could not find a non-3d Athena widget library."),
- athena_lib=$athena_variant)
- ],
- AC_MSG_WARN("Could not find an Athena widget library."))
- else
- dnl The real configuration, need 3d library
- AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
- dnl OK, couldn't find it with a proper name, try the standard Athena lib
- dnl If that is 3d, presume the user asked for what they have installed.
- AC_CHECK_LIB(Xaw, threeDClassRec,
- [
- athena_lib=Xaw;
- AC_MSG_WARN("Assuming that libXaw is actually $athena_variant.");
- ],
- AC_MSG_WARN("Could not find a 3d Athena widget library that looked like $athena_variant.")))
- fi
-
- dnl Now we locate the Athena headers that we need.
- if test "$athena_3d" = "no"; then
- AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
- AC_MSG_WARN("Could not find a non-3d Athena header set."),
- AC_CHECK_HEADER(X11/Xaw/XawInit.h,
- athena_h_path=X11/Xaw,
- AC_MSG_WARN("Could not find a non-3d Athena header set.")))
- else
- dnl The three-d Athena headers are so much more slippery.
- dnl Curse this `Lets replace standard libraries' thing that they did. :/
- AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
- AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
- athena_h_path=X11/$athena_variant,))
-
- dnl If we couldn't find the specific variant, try the generic Athena 3d headers
- if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
- AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
- AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
- [
- AC_MSG_WARN("Assuming that X11/Xaw3d headers are suitable for $athena_variant.")
- athena_h_path=X11/Xaw3d
- ],))
- fi
-
- dnl If nothing yet found, see if Xaw is a 3d header set...
- dnl We AC_MSG_WARN if we fail because I am all out of ideas...
- if test -z "$athena_h_path"; then
- AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
- [
- AC_MSG_WARN("Assuming that X11/Xaw headers are suitable for $athena_variant.")
- athena_h_path=X11/Xaw
- ],
- AC_MSG_WARN("Could not find a suitable 3d Athena header set."))
- fi
- fi
-
- dnl Do we actually have a usable Athena widget set? Please?
- if test -n "$athena_lib" -a -n "$athena_h_path"; then
- have_xaw=yes
- else
- have_xaw=no
- fi