# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca]) AC_CONFIG_AUX_DIR([./automake]) AM_SILENT_RULES([yes]) m4_include([../automake/cfa.m4]) AM_INIT_AUTOMAKE([subdir-objects]) # don't use the default CFLAGS as they unconditonnaly add -O2 : ${CFLAGS=""} # Allow program name tansformation # will fill program_transform_name with appropriate sed regex AC_ARG_PROGRAM AC_ARG_VAR(ARCHITECTURE, [The architecture to use when building libcfa]) AC_ARG_VAR(CONFIGURATION, [The configuration to use when building libcfa, options are: deubg, nodebug, nolib (prelude-only)]) AC_ARG_VAR(DRIVER_DIR, [The path to the cforall driver directory]) CFACC=${DRIVER_DIR}cfa CFACPP=${DRIVER_DIR}cfa-cpp AC_SUBST(CFACC) AC_SUBST(CFACPP) #============================================================================== #Handle specific flags case $ARCHITECTURE in "x64" ) ARCH_FLAGS="-m64";; "x86" ) ARCH_FLAGS="-m32";; "arm" ) ARCH_FLAGS="";; esac AC_SUBST(ARCH_FLAGS) case $CONFIGURATION in "debug" ) CONFIG_CFLAGS="-O0 -g" CONFIG_CFAFLAGS="-debug" CONFIG_BUILDLIB="yes" ;; "nodebug" ) CONFIG_CFLAGS="-O2 -s" CONFIG_CFAFLAGS="-nodebug" CONFIG_BUILDLIB="yes" ;; "nolib" ) CONFIG_CFLAGS="-O2 -s" CONFIG_CFAFLAGS="-nodebug" CONFIG_BUILDLIB="no" ;; esac AC_SUBST(CONFIG_CFLAGS) AC_SUBST(CONFIG_CFAFLAGS) AC_SUBST(CONFIG_BUILDLIB) AM_CONDITIONAL([BUILDLIB], [test "x${CONFIG_BUILDLIB}" = "xyes"]) #============================================================================== #Trasforming cc1 will break compilation M4CFA_PROGRAM_NAME #============================================================================== # Installation paths M4CFA_PARSE_PREFIX # Checks for programs. AC_PROG_CXX AC_PROG_CC AM_PROG_AS AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB AC_CONFIG_FILES([ Makefile src/Makefile prelude/Makefile ]) AC_OUTPUT() # Final text AC_MSG_RESULT(Cforall library configuraton completed. Type "make -j 8 install".)