From ffe9a032601ffb59a10141bce13b4322a1584e87 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 24 Jan 2016 15:27:30 -0800 Subject: Misc. fixes With the siwtch to a C++ compiler, the AC_PATH_XTRA has become less effective as it internally relies on the C compiler invokation. Fixed CXXFLAGS, CPPFLAGS, and LDFLAGS when detecting usability. Various bitmasks in src/hyper and src/graph were bogusly using 'char' (instead of 'unsigned char') when they specify values larger than 127. Caught by the C++ compiler, thanks to no-narrowing conversion. Fixed. Eventually the X11-based HD interface and graphics should be replaced by a more modern GUI interface. --- config/open-axiom.m4 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index 991424c6..747319aa 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -1009,12 +1009,6 @@ dnl 4. checks for special X11R6 libraries that need to be linked before dnl the flag [[-lX11]]. AC_DEFUN([OPENAXIOM_CHECK_X11],[ AC_PATH_XTRA -## Output directives for the C compiler -AC_SUBST(X_CLFAGS) -## Output directives for the linker -AC_SUBST(X_LIBS) -## Output any extra libraries required by X11 -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 of uncertain @@ -1035,10 +1029,19 @@ oa_use_x=no if test x"$no_x" = xyes; then AC_MSG_NOTICE([The Graphics component is disabled.]) else + oa_saved_cxxflags=$CXXFLAGS + oa_saved_cppflags=$CPPFLAGS + oa_saved_ldflags=$LDFLAGS + CXXFLAGS="$CXXFLAGS $X_CFLAGS" + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + LDFLAGS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" AC_CHECK_HEADERS([X11/xpm.h],[], [AC_MSG_ERROR([The header could not be found. Install Xpm development package and re-start the configuration process.])]) oa_use_x=yes oa_c_runtime="$oa_c_runtime graphics" + LDFLAGS=$oa_saved_ldflags + CPPFLAGS=$oa_saved_cppflags + CXXFLAGS=$oa_saved_cxxflags fi AC_SUBST(oa_use_x) ]) -- cgit v1.2.3