Added autotools Windows support
This commit is contained in:
30
configure.ac
30
configure.ac
@ -131,7 +131,7 @@ AC_ARG_WITH([gsl],
|
||||
AC_MSG_ERROR(GSL cannot be found at the specified path!)
|
||||
fi
|
||||
AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation...])],
|
||||
[PKG_CHECK_MODULES(GSL, gsl >= 1.9 gslcblas >= 1.9, [GSL_FOUND=1],
|
||||
[PKG_CHECK_MODULES(GSL, gsl >= 1.9, [GSL_FOUND=1],
|
||||
[if test -r /usr/local/include/gsl/gsl_sf_hyperg.h; then
|
||||
GSL_PREFIX="/usr/local"
|
||||
AC_MSG_RESULT([using ${GSL_PREFIX} as prefix of the GSL installation... (ignore the no just above)])
|
||||
@ -203,8 +203,8 @@ dnl -----------------------------------------------
|
||||
|
||||
ROOT_PATH([5.22/00], [], AC_MSG_ERROR([Either ROOT is not installed correctly or the version is too old... please check!]))
|
||||
|
||||
ROOT_LIBS="-L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser "
|
||||
ROOT_CFLAGS="-I@ROOTINCDIR@ @ROOTCFLAGS@"
|
||||
ROOT_LIBS="[-L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser]"
|
||||
ROOT_CFLAGS="[-I@ROOTINCDIR@ @ROOTCFLAGS@]"
|
||||
AC_SUBST(ROOT_LIBS)
|
||||
AC_SUBST(ROOT_CFLAGS)
|
||||
|
||||
@ -227,6 +227,30 @@ AC_SUBST(PMUSR_LIBS)
|
||||
AC_SUBST(PMUSR_CFLAGS)
|
||||
|
||||
|
||||
dnl -----------------------------------------------
|
||||
dnl Set host specific compiler and linker flags
|
||||
dnl -----------------------------------------------
|
||||
|
||||
LOCAL_BIN_CXXFLAGS="-Wall -Wno-trigraphs"
|
||||
LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}"
|
||||
LOCAL_BIN_LDFLAGS=
|
||||
LOCAL_LIB_LDFLAGS=
|
||||
|
||||
case "$host" in
|
||||
*-*-cygwin)
|
||||
LOCAL_BIN_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}"
|
||||
LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS} -D_DLL"
|
||||
LOCAL_BIN_LDFLAGS="${LOCAL_BIN_LDFLAGS} -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
|
||||
LOCAL_LIB_LDFLAGS="${LOCAL_BIN_LDFLAGS} -Wl,--export-all-symbols"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(LOCAL_BIN_CXXFLAGS)
|
||||
AC_SUBST(LOCAL_LIB_CXXFLAGS)
|
||||
AC_SUBST(LOCAL_BIN_LDFLAGS)
|
||||
AC_SUBST(LOCAL_LIB_LDFLAGS)
|
||||
|
||||
|
||||
dnl -----------------------------------------------
|
||||
dnl Some standard checks for header files and libraries
|
||||
dnl -----------------------------------------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
SUBDIRS = classes external
|
||||
SUBDIRS = external classes
|
||||
|
||||
bin_PROGRAMS = musrfit musrview musrt0 musrparam msr2msr
|
||||
musrfit_SOURCES = musrfit.cpp
|
||||
@ -12,9 +12,14 @@ msr2msr_SOURCES = msr2msr.cpp
|
||||
xmldir = $(bindir)
|
||||
xml_DATA = musrfit_startup.xml
|
||||
|
||||
LIBADD = $(LEM_LIBS) $(PMUSR_LIBS)
|
||||
LIBADD = $(PMUSR_LIBS) $(LEM_LIBS)
|
||||
|
||||
AM_CXXFLAGS = -Wall -Wno-trigraphs
|
||||
# The ROOT flags and libs have to be specified here... different automake-versions do not expand the @...@ in the variable of configure.ac
|
||||
ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@
|
||||
ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser
|
||||
|
||||
AM_CXXFLAGS = $(LOCAL_BIN_CXXFLAGS)
|
||||
AM_LDFLAGS = $(LOCAL_BIN_LDFLAGS)
|
||||
INCLUDES = $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS)
|
||||
LIBS = $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
|
||||
|
@ -66,24 +66,26 @@ ext_cpp_sources = $(ext_source_dir)/MuSR_td_PSI_bin.cpp
|
||||
|
||||
include_HEADERS = $(h_sources) $(ext_source_dir)/MuSR_td_PSI_bin.h
|
||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(ext_source_dir)/tydefs.h
|
||||
|
||||
# The ROOT flags and libs have to be specified here... different automake-versions do not expand the @...@ in the variable of configure.ac
|
||||
ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@
|
||||
ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@ -lMinuit2 -lMathMore -lXMLParser
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/include -I$(ext_source_dir) $(LEM_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS)
|
||||
AM_CXXFLAGS = -Wall -Wno-trigraphs
|
||||
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
||||
|
||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||
AM_CPPFLAGS = -I@ROOTINCDIR@
|
||||
AM_LDFLAGS = -L@ROOTLIBDIR@
|
||||
AM_LDFLAGS = -L@ROOTLIBDIR@ $(LOCAL_LIB_LDFLAGS)
|
||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
|
||||
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $(AM_CPPFLAGS) $^
|
||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
|
||||
|
||||
lib_LTLIBRARIES = libPMusr.la
|
||||
|
||||
LIBADD = $(LEM_LIBS)
|
||||
|
||||
libPMusr_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources) $(ext_h_sources) $(ext_cpp_sources)
|
||||
libPMusr_la_LIBADD = $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
libPMusr_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE)
|
||||
libPMusr_la_LIBADD = $(LEM_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
libPMusr_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = PMusr.pc
|
||||
|
13
src/external/TLemRunHeader/Makefile.am
vendored
13
src/external/TLemRunHeader/Makefile.am
vendored
@ -22,22 +22,25 @@ dict_cpp_sources = \
|
||||
|
||||
include_HEADERS = $(h_sources)
|
||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||
|
||||
ROOT_CFLAGS = -I@ROOTINCDIR@ @ROOTCFLAGS@
|
||||
ROOT_LIBS = -L@ROOTLIBDIR@ @ROOTGLIBS@
|
||||
|
||||
INCLUDES = -I. $(ROOT_CFLAGS)
|
||||
AM_CXXFLAGS = -Wall -Wno-trigraphs
|
||||
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
||||
|
||||
BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources)
|
||||
AM_CPPFLAGS = -I@ROOTINCDIR@
|
||||
AM_LDFLAGS = -L@ROOTLIBDIR@
|
||||
AM_LDFLAGS = -L@ROOTLIBDIR@ $(LOCAL_LIB_LDFLAGS)
|
||||
CLEANFILES = *Dict.cxx *Dict.h *~ core
|
||||
|
||||
%Dict.cxx %Dict.h: %.h %LinkDef.h
|
||||
@ROOTCINT@ -v -f $*Dict.cxx -c -p $(INCLUDES) $(AM_CPPFLAGS) $^
|
||||
@ROOTCINT@ -v -f $*Dict.cxx -c -p $(INCLUDES) $^
|
||||
|
||||
lib_LTLIBRARIES = libTLemRunHeader.la
|
||||
|
||||
libTLemRunHeader_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libTLemRunHeader_la_LIBADD = $(ROOT_LIBS)
|
||||
libTLemRunHeader_la_LDFLAGS = -version-info $(LEM_LIBRARY_VERSION) -release $(LEM_RELEASE)
|
||||
libTLemRunHeader_la_LDFLAGS = -version-info $(LEM_LIBRARY_VERSION) -release $(LEM_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = TLemRunHeader.pc
|
||||
|
Reference in New Issue
Block a user