Including GSL in the configure script does not work if GSL not in standard path

Added lines to -I/gsl/include/path to Makefile.common if the path is not either
/usr or /usr/local.

refs #147
This commit is contained in:
Alex Lin 2015-12-02 10:26:41 -06:00
parent 519cdaf7f1
commit bdc24072e5

View File

@ -136,24 +136,16 @@ ifneq ($(GSL_HOME),)
TRICK_EXEC_LINK_LIBS += -L$(GSL_HOME)/lib64
endif
TRICK_EXEC_LINK_LIBS += -L$(GSL_HOME)/lib
ifneq ($(GSL_HOME),/usr/local)
TRICK_SYSTEM_CFLAGS += -I$(GSL_HOME)/include
TRICK_SYSTEM_CXXFLAGS += -I$(GSL_HOME)/include
endif
endif
TRICK_EXEC_LINK_LIBS += -lgsl -lgslcblas
TRICK_SYSTEM_CFLAGS += -D_HAVE_GSL
TRICK_SYSTEM_CXXFLAGS += -D_HAVE_GSL
TRICK_SYSTEM_CFLAGS += -D_HAVE_GSL
TRICK_SYSTEM_CXXFLAGS += -D_HAVE_GSL
endif
#HAVE_GSL := $(shell test -e ${GSL_HOME}/include/gsl && echo "1")
#ifeq ($(HAVE_GSL),1)
# ifneq ($(GSL_HOME),/usr)
# HAVE_GSL_HOME_LIB64 := $(shell test -e ${GSL_HOME}/lib64 && echo "1")
# ifeq ($(HAVE_GSL_HOME_LIB64),1)
# TRICK_EXEC_LINK_LIBS += -L$(GSL_HOME)/lib64
# endif
# TRICK_EXEC_LINK_LIBS += -L$(GSL_HOME)/lib
# endif
# TRICK_EXEC_LINK_LIBS += -lgsl -lgslcblas
#endif
TRICK_INCLUDE = $(shell $(PERL) -e '@inc_paths = "${TRICK_CFLAGS}" =~ /-I\s*(\S+)/g ; foreach $$i (@inc_paths) { print "-I$$i " if (-e $$i)}')
TRICK_INCLUDE += $(shell $(PERL) -e '@inc_paths = "${TRICK_SYSTEM_CFLAGS}" =~ /-I\s*(\S+)/g ; foreach $$i (@inc_paths) { print "-I$$i " if (-e $$i)}')
TRICK_DEFINES = $(shell $(PERL) -e '@defines = "${TRICK_CFLAGS}" =~ /-D\s*(\S+)/g ; foreach $$i (@defines) { print "-D$$i "}')