Make Trick Mac Homebrew friendly

Added /usr/local to the list of search directories in the configure script
for the motif header files.  Added -lc++abi to the list of link libraries.

refs #66
This commit is contained in:
Alex Lin 2015-06-17 09:00:18 -05:00
parent 3577e72bce
commit 80091454ce
3 changed files with 25 additions and 2 deletions

21
configure vendored
View File

@ -4845,6 +4845,24 @@ done
ac_fn_cxx_check_header_mongrel "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
MOTIF_HOME="/usr"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/local/include/Xm/Xm.h" >&5
$as_echo_n "checking for /usr/local/include/Xm/Xm.h... " >&6; }
if ${ac_cv_file__usr_local_include_Xm_Xm_h+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/usr/local/include/Xm/Xm.h"; then
ac_cv_file__usr_local_include_Xm_Xm_h=yes
else
ac_cv_file__usr_local_include_Xm_Xm_h=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_local_include_Xm_Xm_h" >&5
$as_echo "$ac_cv_file__usr_local_include_Xm_Xm_h" >&6; }
if test "x$ac_cv_file__usr_local_include_Xm_Xm_h" = xyes; then :
MOTIF_HOME="/usr/local"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sw/include/Xm/Xm.h" >&5
$as_echo_n "checking for /sw/include/Xm/Xm.h... " >&6; }
@ -4863,10 +4881,13 @@ fi
$as_echo "$ac_cv_file__sw_include_Xm_Xm_h" >&6; }
if test "x$ac_cv_file__sw_include_Xm_Xm_h" = xyes; then :
MOTIF_HOME="/sw"
else
as_fn_error $? "could not find Xm/Xm.h" "$LINENO" 5
fi
fi
fi

View File

@ -121,9 +121,10 @@ AX_GSL_HOME([])
AX_GTEST_HOME([])
AX_PYTHON_DEVEL([>='2.5'])
AC_CHECK_HEADER(Xm/Xm.h, [MOTIF_HOME="/usr"], AC_CHECK_FILE(/sw/include/Xm/Xm.h, [MOTIF_HOME="/sw"]))
AC_CHECK_HEADER(Xm/Xm.h, [MOTIF_HOME="/usr"],
AC_CHECK_FILE(/usr/local/include/Xm/Xm.h, [MOTIF_HOME="/usr/local"],
AC_CHECK_FILE(/sw/include/Xm/Xm.h, [MOTIF_HOME="/sw"],AC_MSG_ERROR([could not find Xm/Xm.h]))))
AC_SUBST([MOTIF_HOME])
AC_OUTPUT([share/trick/makefiles/config_user.mk])

View File

@ -50,6 +50,7 @@ endif
ifeq ($(TRICK_HOST_TYPE),Darwin)
CXXFLAGS += -std=c++11
CLANGLIBS += -lLLVMOption -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMSupport $(shell $(LLVM_HOME)/bin/llvm-config --system-libs)
CXXFLAGS += -lc++abi
endif
all: $(ICG)