Commit 4031e894 authored by Hans-Nikolai Viessmann's avatar Hans-Nikolai Viessmann
Browse files

Merge branch 'artem-remove-old-buildsystem' into 'develop'

Artem remove old buildsystem

Closes #1212

See merge request !45
parents fb545b33 4f9c3ab6
###############################################################################
#
# Calling conventions:
#
# Start rules:
# default compile executables as developer code and libraries as product
# code
# devel compile everything as developer code
# prod compile everything as product code
#
# clean cleanup all derived files
# cleandevel cleanup only developer compiled files
# cleanprod cleanup only product compiled files
#
# tidy cleanup all derived files excluding make tools
# tidydevel cleanup only developer compiled files excluding make tools
# tidyprod cleanup only product compiled files excluding make tools
#
# refactor refactor source code (requires parameters below)
#
# config rebuild autoconf-gnerated scripts, e.g. configure,
# src/include/config.h.in, etc.
#
# install install sac2c under the $PREFIX directory. Please note
# that $PREFIX can be set when you run ./configure via
# ./configure --prefix=/path/to/some/location
# Also, make sure that your $PREFIX/bin is on the PATH.
#
# uninstall Remove the files created by the install target. Please
# note that it does not remove a directory structure, only
# the files.
#
# Parameters:
# DEPS="no" de-activate dependency checking meachanism
# HIDE="" show important commands issued by make (debugging)
#
# Refactor parameters:
# PATTERN="" pattern to look for in all source files
# OUTPUT="" text to replace matched pattern
#
###############################################################################
# This Makefile is a wrapper around cmake that allows to quickly
# make default build and install of product and development versions
# of the compiler.
BUILD_DIR_DEBUG := build_d
BUILD_DIR_RELEASE := build_r
MAKE_NUMTHREADS ?= 4
###############################################################################
#
# general setup:
#
define BUILD =
if [ -d $(1) ]; then \
cd $(1); make -j$(MAKE_NUMTHREADS); cd -; \
else \
mkdir -p $(1); \
cd $(1); \
cmake -DCMAKE_BUILD_TYPE=$(2) ..; \
$(MAKE) -j$(MAKE_NUMTHREADS); \
cd -; \
fi
endef
PROJECT_ROOT := .
HIDE := @
DEPS := yes
CLEAN_MAKE_TOOLS := "yes"
all: release debug
MAKEFILE_DIR := $(PROJECT_ROOT)/src/makefiles
release:
$(call BUILD,$(BUILD_DIR_RELEASE),RELEASE)
-include $(MAKEFILE_DIR)/config.mkf # config.mkf may not yet exist
include $(MAKEFILE_DIR)/settings.mkf
debug:
$(call BUILD,$(BUILD_DIR_DEBUG),DEBUG)
# A function that outputs an argument surrounded by the box of stars.
# Like this:
# ********
# * arg
# ********
# The first and second line are expansions of $(frame_stars) variable.
frame_stars := "************************************************************"
framed_text = @$(ECHO) -e "$(frame_stars)\n* $(1)\n$(frame_stars)"
clean: clean-release clean-debug
clean-release:
$(RM) -rf $(BUILD_DIR_RELEASE)
###############################################################################
#
# Dummy rules
#
clean-debug:
$(RM) -rf $(BUILD_DIR_DEBUG)
.PHONY: default devel prod clean cleandevel cleanprod config \
tidy tidydevel tidyprod
install: install-debug install-release
install-release: release
cd $(BUILD_DIR_RELEASE); make install; cd -
@echo "Please run $(BUILD_DIR_RELEASE)/scripts/sac2c-version-manager " \
"now to set symlinks correctly."
###############################################################################
#
# Start rules
#
# The definition of these rules deliberately enforces a sequence in compilation
# rather than expressing the dependencies properly by makefile rules.
#
# The rationale is that commonlib and maketools rather seldomly require
# recompilation. With proper dependencies, however, they would require a
# dependency from every compilation rule. This would lead to extensive
# rechecking at compile time that is absolutely superfluous.
#
# The runtime system may require the compiler and, likewise, the tools may
# need the runtime system or parts thereof. Expressing all this by dependencies
# would lead to a system in which the tools form the main target. This seems
# unnatural.
#
# Furthermore, the current solution allows us to rebuild locally without
# enforcing dependency checks.
#
install-debug: debug
cd $(BUILD_DIR_DEBUG); make install; cd -
@echo "Please run $(BUILD_DIR_DEBUG)/scripts/sac2c-version-manager " \
"now to set symlinks correctly."
default devel prod: checks
$(call framed_text,Building $(PROJECT_NAME))
$(HIDE) $(MAKE) -C src/maketools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/maketools/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/libsac2c DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/libsac2c/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/runtime DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/runtime/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/tools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/tools/" PREFIX_ROOT="" $@
$(HIDE) for t in $(BUILD_TARGETS); do \
$(MAKE) -f $(MAKEFILE_DIR)/rtlibs.mkf HIDE="$(HIDE)" TARGET=$$t all || exit 1; \
done
$(call framed_text,Building $(PROJECT_NAME) completed)
###############################################################################
#
# Cleaning rules
#
clean cleandevel cleanprod: checks
$(call framed_text,Cleaning $(PROJECT_NAME))
$(HIDE) if [ "$(CLEAN_MAKE_TOOLS)" = "yes" ]; then \
$(MAKE) -C src/maketools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/maketools/" PREFIX_ROOT="" $@ ; \
fi
$(HIDE) $(MAKE) -C src/libsac2c DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/libsac2c/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/runtime DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/runtime/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/tools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/tools/" PREFIX_ROOT="" $@
$(HIDE) for t in $(BUILD_TARGETS); do \
$(MAKE) -f $(MAKEFILE_DIR)/rtlibs.mkf HIDE="$(HIDE)" TARGET=$$t clean || exit 1; \
done
$(HIDE) $(RM) -rf lib/* bin/*
$(call framed_text,Cleaning $(PROJECT_NAME) completed)
tidy:
$(MAKE) CLEAN_MAKE_TOOLS="no" clean
tidydevel:
$(MAKE) CLEAN_MAKE_TOOLS="no" cleandevel
tidyprod:
$(MAKE) CLEAN_MAKE_TOOLS="no" cleanprod
###############################################################################
#
# Refactoring rules
#
refactor: checks
$(call framed_text,Refactoring $(PROJECT_NAME))
$(HIDE) $(MAKE) -C src/maketools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/maketools/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/libsac2c DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/libsac2c/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/runtime DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/runtime/" PREFIX_ROOT="" $@
$(HIDE) $(MAKE) -C src/tools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/tools/" PREFIX_ROOT="" $@
$(call framed_text,Refactoring $(PROJECT_NAME) completed)
###############################################################################
#
# Rules for making selected subprojects in default mode
#
maketools: checks
$(HIDE) $(MAKE) -C src/maketools DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/maketools/" PREFIX_ROOT="" default
libsac2c: checks
$(HIDE) $(MAKE) -C src/libsac2c DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/libsac2c/" PREFIX_ROOT="" default
runtime: checks
$(HIDE) $(MAKE) -C src/runtime DEPS="$(DEPS)" HIDE="$(HIDE)" \
PREFIX_LOCAL="src/runtime/" PREFIX_ROOT="" default
tools: checks
$(HIDE) $(MAKE) -C src/tools DEPS="$(DEPS)" HIDE="$(HIDE)" \
LIBS="$(LIBS)" POLYLIBINCLUDE="$(POLYLIBINCLUDE)" \
PREFIX_LOCAL="src/tools/" PREFIX_ROOT="" default
rtlibs: checks
$(HIDE) for t in $(BUILD_TARGETS); do \
$(MAKE) -f $(MAKEFILE_DIR)/rtlibs.mkf HIDE="$(HIDE)" TARGET=$$t || exit 1; \
done
###############################################################################
#
# Rules to create configure the script. Put it here as a first target.
#
config:
autoreconf -v -f -i -I setup/config
###############################################################################
#
# Includes for consistency checking mechanism
#
include $(MAKEFILE_DIR)/check.mkf
install: checks-install
$(INSTALL) -d "$(INCPATH_CONF)"
$(INSTALL) -d "$(SAC2CRC_DIR)"
$(INSTALL) -d "$(bindir)"
$(INSTALL) -d $(DLL_DIR)
$(RM) .uninstall
for i in include/*.h; do \
dst="$(INCPATH_CONF)"/`basename $$i`; \
$(ECHO) "$$dst" >>.uninstall; \
$(INSTALL_DATA) $$i "$$dst"; \
done
$(ECHO) "$(SAC2CRC_CONF)" >>.uninstall
$(INSTALL_DATA) setup/sac2crc "$(SAC2CRC_CONF)"
for i in bin/*; do \
dst1="$(DLL_DIR)"/`basename $$i`; \
$(ECHO) "$$dst1" >>.uninstall; \
$(INSTALL_PROGRAM) $$i "$$dst1"; \
dst2="$(bindir)"/`basename $$i`; \
$(ECHO) "$$dst2" >>.uninstall; \
$(RM) "$$dst2"; $(LN) "$$dst1" "$$dst2"; \
done
for i in lib/*.*; do \
dst="$(DLL_DIR)"/`basename $$i`; \
$(ECHO) "$$dst" >>.uninstall; \
$(INSTALL_PROGRAM) $$i "$$dst"; \
done
for t in $(BUILD_TARGETS); do \
$(MAKE) -f $(MAKEFILE_DIR)/rtlibs.mkf HIDE="$(HIDE)" TARGET=$$t install; \
done
uninstall:
if test -r .uninstall; then \
cat .uninstall | while read f; do $(RM) "$$f"; done; \
fi
This diff is collapsed.
### Configuration
### DO NOT use autoconf for this script. Instead, do:
### "make config"
dnl Old versions of Autoconf appear to fail
AC_PREREQ([2.63])
dnl tell configure who we are
dnl parameters: package name, version, where to send bugreports
AC_INIT([sac2c], [git], [info@sac-home.org])
dnl set source directory and scripting directory
AC_CONFIG_SRCDIR([setup])
AC_CONFIG_AUX_DIR([setup/config])
dnl ensure the directories are absolute since they will
dnl be used from Makefiles in sub-directories.
srcdir=$(cd "$srcdir" && pwd)
ac_aux_dir=$(cd "$ac_aux_dir" && pwd)
if test -r "$ac_aux_dir/install-sh"; then
ac_install_sh="$ac_aux_dir/install-sh -c"
elif test -r "$ac_aux_dir/install.sh"; then
ac_install_sh="$ac_aux_dir/install.sh -c"
elif test -r "$ac_aux_dir/shtool"; then
ac_install_sh="$ac_aux_dir/shtool install -c"
fi
dnl where to find the SAC standard library sources
CHECK_STDLIB([src/modules/structures/ArrayBasics.xsac])
dnl we use C as our compiler language
AC_LANG(C)
dnl and which files to create -
dnl * variable `_config files' contains the list of files relevent to the
dnl sac2c build system.
dnl * variable `_rc_files' contains the list of files that are used to
dnl generate the sac2crc.pre file - variables created by this script are
dnl substituted into these files, and are later combined into sac2crc.pre.
dnl NOTE: the order of the files in the list is the order that autotools
dnl uses to generate the files, thus sac2crc.pre needs to appear
dnl toward the end of the list.
_config_files="src/makefiles/config.mkf src/tools/saccc"
_rc_files="setup/sac2crc.backend.mutc setup/sac2crc.backend.cuda \
setup/sac2crc.modifiers.cc setup/sac2crc.modifiers.malloc \
setup/sac2crc.modifiers.rcm setup/sac2crc.SUN setup/sac2crc.X86 \
setup/sac2crc.ALPHA setup/sac2crc.MAC setup/sac2crc.pre \
setup/sac2crc.local"
AC_CONFIG_FILES([$_config_files $_rc_files])
AC_CONFIG_HEADER([src/include/config.h])
dnl check for host type
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl if cygwin set IS_CYGWIN
is_cygwin=0
case "$target_os" in
*cygwin*) is_cygwin=1 ;;
esac
AC_DEFINE_UNQUOTED([IS_CYGWIN], [$is_cygwin],
[Set to 1 if target is Cygwin, otherwise 0.])
dnl set OS and ARCH flags
AC_DEFINE_UNQUOTED([OS], ["$target_os"], [OS string])
AC_DEFINE_UNQUOTED([ARCH], ["$target_cpu"], [CPU architecture string])
dnl Enable sac2c compilation with C++
AC_ARG_ENABLE([cplusplus],
[AS_HELP_STRING([[--enable-cplusplus]],
[Use the C++ compiler to compile files produced by sac2c])],
[enable_cplusplus=$enableval],
[enable_cplusplus=no])
dnl Check if C compiler and preprocessor are available
dnl we force CFLAGS to be empty, so that it does not default to -g -O2
CFLAGS=" "
AC_PROG_CC_C99
AC_PROG_CPP
dnl Enable system extensions when they are disabled by default
AC_USE_SYSTEM_EXTENSIONS
dnl Find out if we are using GCC/SunC/DECC/"Mac C"
CHECK_COMPILER_VENDOR
dnl Try to enable link time optimizations (LTO)
CHECK_LTO
dnl Check if C compiler supports SIMD syntax
CHECK_SIMD_SYNTAX
dnl Prints the value of a makefile variable.
getmakevar() {
makefile="$1"
var="$2"
make getmakevar -f - <<EOI
include $makefile
getmakevar:
@echo \$($var)
EOI
}
dnl Check for SAC back-ends (CHECK_LPEL must appear after CHECK_MT)
CHECK_MT
CHECK_LPEL
CHECK_CUDA
CHECK_SL
CHECK_OMP
dnl enable private heap manager?
CHECK_PHM
CHECK_DISTMEM
dnl check for ranlib
AC_PROG_RANLIB
dnl check for some standard tools
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_FGREP
AC_PROG_INSTALL
AC_PROG_MKDIR_P
dnl find a code beautifier.
CHECK_CODE_BEAUTIFIER
dnl search/check various utilities
CHECK_REQUIRED_TOOL([SORT], [sort])
CHECK_REQUIRED_TOOL([UNIQ], [uniq])
CHECK_REQUIRED_TOOL([M4], [gm4 m4])
CHECK_REQUIRED_TOOL([XSLT], [xsltproc sabcmd])
CHECK_REQUIRED_TOOL([BASH], [bash])
dnl search for dot
CHECK_GRAPHVIZ
dnl check for various environment features
CHECK_PTR_PREFIX
CHECK_CONST_STDERR
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_FUNCS([mkdtemp])
AC_SEARCH_LIBS([sqrt], [m])
AC_CHECK_FUNCS([strtok strrchr])
CHECK_HR_CLOCK
dnl check support for dynamic libraries
AC_CHECK_HEADER([dlfcn.h], [], [AC_MSG_ERROR([dlfcn.h is required.])])
AC_SEARCH_LIBS([dlopen], [dl])
CHECK_DLL_EXT
enable_uuid=no
AC_SEARCH_LIBS([uuid_generate], [uuid], [enable_uuid=yes], [enable_uuid=no])
AC_CHECK_HEADER([uuid/uuid.h], [enable_uuid=yes], [enable_uuid=no])
have_uuid=`if test $enable_uuid = yes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED([ENABLE_UUID], [$have_uuid],
[Define to 1 if libuuid is available, otherwise 0.])
AC_SUBST([ENABLE_UUID], [$enable_uuid])
enable_crypt=no
AC_SEARCH_LIBS([crypt], [crypt], [enable_crypt=yes], [enable_crypt=no])
AC_CHECK_HEADER([crypt.h], [enable_crypt=yes], [enable_crypt=no])
have_crypt=`if test $enable_crypt = yes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED([ENABLE_HASH], [$have_crypt],
[Define to 1 if libcrypt is available, otherwise 0.])
AC_SUBST([ENABLE_HASH], [$enable_crypt])
dnl set rtspec flag
enable_rtspec=no
if test x"$ac_cv_search_dlopen" != xno -a x"$enable_mt" = xyes ; then
if test x"$enable_uuid" != xno -o x"$enable_crypt" != xno ; then
enable_rtspec=yes
fi
fi
AC_CHECK_LIB(polylib64,DomainIntersection)
AC_CHECK_LIB(m, log10, AC_SUBST([LIB_M], ["-Xl -lm"]))
AC_SUBST(POLYLIBINCLUDE,["/usr/include/polylib -I/usr/local/include/polylib"])
CHECK_ISL
dnl canonicalize dlopen_libs
case $ac_cv_search_dlopen in
no | none*) dlopen_libs= ;;
* ) dlopen_libs=$ac_cv_search_dlopen ;;
esac
have_rtspec=`if test $enable_rtspec = yes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED([ENABLE_RTSPEC], [$have_rtspec],
[Define to 1 if runtime specialization is enabled, otherwise 0.])
AC_SUBST([ENABLE_RTSPEC], [$enable_rtspec])
dnl Check which GCC warning options are available and
dnl add them later to MKCCFLAGS and PDCCFLAGS
gcc_options=
if test "$GCC" = yes ; then
CHECK_CC_OPTION([-Wall], [gcc_options])
CHECK_CC_OPTION([-Wextra], [gcc_options])
CHECK_CC_OPTION([-Wstrict-prototypes], [gcc_options])
CHECK_CC_OPTION([-Wno-unused-parameter], [gcc_options])
CHECK_CC_OPTION([-Wno-unused-but-set-variable], [gcc_options])
fi
gcc_native=
if test "$GCC" = yes ; then
CHECK_CC_OPTION([-march=native], [gcc_native])
CHECK_CC_OPTION([-mtune=native], [gcc_native])
fi
dnl Check if the C compiler support large bracket depths
dnl this also updates gcc_options as needed.
CHECK_CC_BRACKETS
dnl
dnl test for compiler flags for sac2crc
dnl
dnl test for compiler flags for sac2crc
AC_MSG_CHECKING([sac2crc compiler flags])
if [ test "$GCC" = yes ]; then
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [-O1])
AC_SUBST(OPT_O2, [-O2])
AC_SUBST(OPT_O3, [-O3])
AC_SUBST(OPT_g, [-g])
AC_SUBST(RCCCFLAGS, ["$gcc_options $gcc_native -pedantic -Wall -Wno-unused -fno-builtin $flags_lto"])
AC_SUBST(MKCCFLAGS, ["$gcc_options $gcc_native -pedantic -g $flags_lto"])
AC_SUBST(PDCCFLAGS, ["$gcc_options $gcc_native -pedantic -g -O3 $flags_lto"])
if [ test "$IS_CYGWIN" = yes ]; then
AC_SUBST(GENPIC, ["-DPIC"])
else
AC_SUBST(GENPIC, ["-fPIC -DPIC"])
fi
AC_SUBST(DEPSFLAG, ["-M"])
AC_SUBST(CPPFILE, ["$CPP -C -x c"])
AC_SUBST(CPP, ["$CPP -P -x c"])
AC_MSG_RESULT([gcc settings])
elif [ test "$SUNC" = yes ]; then
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [-xO2])
AC_SUBST(OPT_O2, [-xO4])
AC_SUBST(OPT_O3, [-xO5])
AC_SUBST(OPT_g, [-g])
AC_SUBST(RCCCFLAGS, ["-dalign -fsimple -xsafe=mem"])
AC_SUBST(MKCCFLAGS, ["-erroff=E_CAST_DOESNT_YIELD_LVALUE -g"])
AC_SUBST(PDCCFLAGS, ["-erroff=E_CAST_DOESNT_YIELD_LVALUE -g -xO4 -KPIC"])
AC_SUBST(GENPIC, ["-KPIC"])
AC_SUBST(DEPSFLAG, ["-xM"])
AC_SUBST(CPPFILE, ["$CPP -C -x c"])
AC_SUBST(CPP, ["$CPP -P -x c"])
AC_MSG_RESULT([Sun cc settings])
elif [ test "$DECC" = yes ]; then
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [-O1])
AC_SUBST(OPT_O2, [-O2])
AC_SUBST(OPT_O3, [-O3])
AC_SUBST(OPT_g, [-g])
AC_SUBST(RCCCFLAGS, [""])
AC_SUBST(MKCCFLAGS, ["-g"])
AC_SUBST(PDCCFLAGS, ["-g3"])
AC_SUBST(GENPIC, [""])
AC_SUBST(DEPSFLAG, ["-M"])
AC_SUBST(CPPFILE, ["$CPP -C -x c"])
AC_SUBST(CPP, ["$CPP -P -x c"])
AC_MSG_RESULT([Compaq/DEC cc settings])
elif [ test "$MACC" = yes ]; then
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [-O1])
AC_SUBST(OPT_O2, [-O2])
AC_SUBST(OPT_O3, [-O3])
AC_SUBST(OPT_g, [-g])
AC_SUBST(RCCCFLAGS, ["-Wall -Wno-unused -fno-builtin"])
AC_SUBST(MKCCFLAGS, ["-Wall -g"])
AC_SUBST(PDCCFLAGS, [""])
AC_SUBST(GENPIC, [""])
AC_SUBST(DEPSFLAG, ["-M"])
AC_SUBST(CPPFILE, ["$CPP -C -x c"])
AC_SUBST(CPP, ["$CPP -P -x c"])
AC_MSG_RESULT([Apple cc settings])
else
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [""])
AC_SUBST(OPT_O2, [""])
AC_SUBST(OPT_O3, [""])
AC_SUBST(OPT_g, [""])
AC_SUBST(RCCCFLAGS, [""])
AC_SUBST(MKCCFLAGS, [""])
AC_SUBST(PDCCFLAGS, [""])
AC_SUBST(GENPIC, [""])
AC_SUBST(DEPSFLAG, ["-M"])
AC_SUBST(CPPFILE, ["$CPP -C"])
AC_SUBST(CPP, ["$CPP -P"])
AC_MSG_RESULT([none found])
fi
AC_SUBST(CCMT_PTH_LINK, ["$PTHREAD_LIBS"])
AC_SUBST(CCMT_PTH_CFLAGS, ["$PTHREAD_CFLAGS"])
AC_SUBST(CCDLLINK, ["$dlopen_libs $flags_lto"])
dnl This is a special case for building sac2c with c++ compiler.
if [[ "$GXX" = yes -a "$enable_cplusplus" = yes ]]; then
AC_SUBST(SAC2C_CC, ["g++"])
AC_SUBST(OPT_O0, [""])
AC_SUBST(OPT_O1, [-O1])
AC_SUBST(OPT_O2, [-O2])
AC_SUBST(OPT_O3, [-O3])
AC_SUBST(OPT_g, [-g])
AC_SUBST(RCCCFLAGS, ["-Wall -Wno-unused -fno-builtin"])
AC_SUBST(SAC2C_MKCCFLAGS, ["-Wno-write-strings -g"])
AC_SUBST(SAC2C_PDCCFLAGS, ["-Wno-write-strings -g -O3"])
AC_SUBST(GENPIC, ["-fPIC -DPIC"])
AC_SUBST(DEPSFLAG, ["-M"])
AC_SUBST(CPPFILE, ["$CPP -C -x c"])
AC_SUBST(CPP, ["$CPP -P -x c"])
AC_MSG_RESULT([gcc settings])
else
AC_SUBST(SAC2C_CC, ["$CC"])
AC_SUBST(SAC2C_MKCCFLAGS, ["$MKCCFLAGS"])
AC_SUBST(SAC2C_PDCCFLAGS, ["$PDCCFLAGS"])
fi
dnl
dnl append platform specific files to sac2crc
dnl
AC_SUBST_FILE([RCMUTC])
AC_SUBST_FILE([RCCUDA])
AC_SUBST_FILE([RCCC])
AC_SUBST_FILE([RCMALLOC])
AC_SUBST_FILE([RCRCM])
AC_SUBST_FILE([RCSUN])
AC_SUBST_FILE([RCX86])
AC_SUBST_FILE([RCALPHA])
AC_SUBST_FILE([RCMAC])
RCMUTC=setup/sac2crc.backend.mutc
RCCUDA=setup/sac2crc.backend.cuda
RCCC=setup/sac2crc.modifiers.cc
RCMALLOC=setup/sac2crc.modifiers.malloc
RCRCM=setup/sac2crc.modifiers.rcm
RCSUN=setup/sac2crc.SUN
RCX86=setup/sac2crc.X86
RCALPHA=setup/sac2crc.ALPHA
RCMAC=setup/sac2crc.MAC
dnl
dnl Append GASNet conduit targets file to sac2crc.
dnl
AC_SUBST_FILE([GASNET_CONDUIT_TARGETS])
GASNET_CONDUIT_TARGETS=./sac2crc.GASNetconduits
dnl
dnl Append GASNet conduit settings file to config.mkf.
dnl
AC_SUBST_FILE([GASNET_CONDUIT_SETTINGS])
GASNET_CONDUIT_SETTINGS=./config.GASNetconduits
dnl
dnl Append rules for building libsacdistmem GASNet object files to build.mkf
dnl
AC_SUBST_FILE([GASNET_CONDUIT_BUILD_OBJECT_FILES])
GASNET_CONDUIT_BUILD_OBJECT_FILES=./build.GASNetconduits
dnl
dnl Append rules for building libsacdistmem GASNet cross variant object files to build.mkf
dnl