From 6f20aa4b8b1552608cdaf3d3018e60c20a43cff3 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Mon, 27 Jun 2016 09:50:04 -0500 Subject: [PATCH] Save X11 include and library information from configure Saved the value of x_libraries variable from the autoconf AC_PATH_X if the location is not standard. refs #133 --- autoconf/configure.ac | 3 +++ configure | 7 +++++++ share/trick/makefiles/config_user.mk.in | 4 +++- trick_source/data_products/DPX/APPS/FXPLOT/makefile | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 75e2af95..a01ad469 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -210,6 +210,9 @@ dnl look for libraries and headers we need to compile AC_PATH_X AS_IF([test "$no_x" = "yes"],AC_MSG_ERROR([could not find Xwindows development libraries and/or headers]),[]) AC_CHECK_HEADER([X11/Intrinsic.h],[],AC_MSG_ERROR([could not find libxt development headers])) +AS_IF([test "x$x_libraries" = "x"],[X_LIB_DIR=],[X_LIB_DIR=-L$x_libraries]) +dnl X_LIBRARIES=$x_libraries +AC_SUBST([X_LIB_DIR]) AX_JSC_DIRS([]) AC_CHECK_LIB(xml2, main, [LIBXML=-lxml2 diff --git a/configure b/configure index 72c748e6..22e4cad3 100755 --- a/configure +++ b/configure @@ -653,6 +653,7 @@ build_cpu build LIBXML MOTIF_HOME +X_LIB_DIR EGREP GREP CXXCPP @@ -5867,6 +5868,12 @@ else fi +if test "x$x_libraries" = "x"; then : + X_LIB_DIR= +else + X_LIB_DIR=-L$x_libraries +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for trick_source/data_products/fermi-ware" >&5 $as_echo_n "checking for trick_source/data_products/fermi-ware... " >&6; } diff --git a/share/trick/makefiles/config_user.mk.in b/share/trick/makefiles/config_user.mk.in index 58605163..99737869 100644 --- a/share/trick/makefiles/config_user.mk.in +++ b/share/trick/makefiles/config_user.mk.in @@ -10,13 +10,15 @@ PYTHON = @PYTHON@ JAVAC = @JAVA_CC@ CLANG = @CLANG@ +LLVM_HOME = @LLVM_HOME@ + PYTHON_INCLUDES = @PYTHON_CPPFLAGS@ PYTHON_LIB = @PYTHON_LIBS@ @PYTHON_EXTRA_LDFLAGS@ # @PYTHON_EXTRA_LIBS@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ -LLVM_HOME = @LLVM_HOME@ +X_LIB_DIR = @X_LIB_DIR@ MOTIF_HOME = @MOTIF_HOME@ UDUNITS_INCLUDES = @UDUNITS_INCLUDES@ diff --git a/trick_source/data_products/DPX/APPS/FXPLOT/makefile b/trick_source/data_products/DPX/APPS/FXPLOT/makefile index 6c0a4494..d11d2194 100644 --- a/trick_source/data_products/DPX/APPS/FXPLOT/makefile +++ b/trick_source/data_products/DPX/APPS/FXPLOT/makefile @@ -22,7 +22,7 @@ endif ifeq ($(TRICK_HOST_TYPE), Darwin) INCDIRS += -I/usr/X11/include - XLIBS = -L${MOTIF_HOME}/lib -lXm -L/usr/X11R6/lib -L/usr/X11/lib -lXt -lX11 -lc++abi + XLIBS = -L${MOTIF_HOME}/lib -lXm -L/usr/X11R6/lib ${X_LIB_DIR} -lXt -lX11 -lc++abi else ifneq (${MOTIF_HOME},/usr) XLIBS = -L${MOTIF_HOME}/lib64 -L${MOTIF_HOME}/lib