aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/open-axiom.m413
-rw-r--r--config/openaxiom-c-macros.h.in3
2 files changed, 11 insertions, 5 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 4fef7459..92c510a0 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -874,25 +874,28 @@ AC_SUBST(X_LIBS)
AC_SUBST(X_EXTRA_LIBS)
## Finally, output the list of libraries that need to appear before -lX11
-## Some part of OpenAxiom depends on Xpm. That library has kind uncertain
+## Some part of OpenAxiom depends on Xpm. That library has kind of uncertain
## future. At some point in the past, it was deprecated, to be
## replaced by xpm-nox; then came back again. So, its support may
## vary from system to system. For the moment, we assume that if X11
-## is found then, Xpm is already present. Though, clearly that is a
+## is found then, Xpm is also present. Though, clearly that is a
## very optimistic assumption. Long term, OpenAxiom should get rid of
## dependence on Xpm. A nearly fool-proof test would be probably
## inspired by AC_PATH_XTRA. I don't have time to get to that
## complication right now. Will fix later.
+## But we can check for the existence of <X11/xpm.h>
X_PRE_LIBS="-lXpm $X_PRE_LIBS"
AC_SUBST(X_PRE_LIBS)
## If the system supports X11, then build graphics
axiom_use_x=no
-if test -z "$no_x"; then
+if test x"$no_x" = xyes; then
+ AC_MSG_NOTICE([The Graphics component is disabled.])
+else
+ AC_CHECK_HEADERS([X11/xpm.h],[],
+ [AC_MSG_ERROR([The header <X11/xpm.h> could not be found. Install Xpm development package and re-start the configuration process.])])
axiom_use_x=yes
oa_c_runtime="$oa_c_runtime graphics"
-else
- AC_MSG_NOTICE([The Garphics component is disabled.])
fi
AC_SUBST(axiom_use_x)
])
diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in
index 1eb6df78..1f9f1bc8 100644
--- a/config/openaxiom-c-macros.h.in
+++ b/config/openaxiom-c-macros.h.in
@@ -156,6 +156,9 @@
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
+/* Define to 1 if you have the <X11/xpm.h> header file. */
+#undef HAVE_X11_XPM_H
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR