source: libcfa/configure.ac @ 553772b

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 553772b was 3fcbdca1, checked in by Thierry Delisle <tdelisle@…>, 5 years ago

Moved compilation to use O3/Og instead of O2/O0 for both cfa-cpp and libcfa

  • Property mode set to 100644
File size: 2.5 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.68])
5AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
6AC_CONFIG_AUX_DIR([automake])
7AC_CONFIG_MACRO_DIRS([automake])
8AM_SILENT_RULES([yes])
9
10m4_include([../automake/cfa.m4])
11
12AM_INIT_AUTOMAKE([subdir-objects])
13
14# don't use the default CFLAGS as they unconditonnaly add -O2
15: ${CFLAGS=""}
16
17# define this to override
18AR_FLAGS="cr"
19
20# Allow program name tansformation
21# will fill program_transform_name with appropriate sed regex
22AC_ARG_PROGRAM
23
24AC_ARG_VAR(ARCHITECTURE,  [The architecture  to use when building libcfa])
25AC_ARG_VAR(CONFIGURATION, [The configuration to use when building libcfa, options are: deubg, nodebug, nolib (prelude-only)])
26AC_ARG_VAR(DRIVER_DIR, [The path to the cforall driver directory])
27AC_ARG_VAR(CFA_VERSION, [The long version of cfa])
28
29CFACC=${DRIVER_DIR}cfa
30CFACPP=${DRIVER_DIR}cfa-cpp
31AC_SUBST(CFACC)
32AC_SUBST(CFACPP)
33AC_SUBST(CFA_VERSION)
34
35#==============================================================================
36#Handle specific flags
37case $ARCHITECTURE in
38        "x64"        ) ARCH_FLAGS="-m64";;
39        "x86"        ) ARCH_FLAGS="-m32";;
40        "arm"        ) ARCH_FLAGS="";;
41esac
42
43AC_SUBST(ARCH_FLAGS)
44
45case $CONFIGURATION in
46        "debug"   )
47                CONFIG_CFLAGS="-Og -g"
48                CONFIG_CFAFLAGS="-debug"
49                CONFIG_BUILDLIB="yes"
50        ;;
51        "nodebug" )
52                CONFIG_CFLAGS="-O3 -s"
53                CONFIG_CFAFLAGS="-nodebug"
54                CONFIG_BUILDLIB="yes"
55        ;;
56        "nolib"   )
57                CONFIG_CFLAGS="-O3 -s"
58                CONFIG_CFAFLAGS="-nolib"
59                CONFIG_BUILDLIB="no"
60        ;;
61        "profile" )
62                CONFIG_CFLAGS="-O3 -g -fno-omit-frame-pointer"
63                CONFIG_CFAFLAGS="-nodebug"
64                CONFIG_BUILDLIB="yes"
65        ;;
66        *)
67        AC_MSG_ERROR('Invalid value $CONFIGURATION for \$CONFIGURATION')
68        ;;
69esac
70
71CONFIG_CFAFLAGS="${CONFIG_CFAFLAGS} ${CFAFLAGS}"
72
73AC_SUBST(CONFIG_CFLAGS)
74AC_SUBST(CONFIG_CFAFLAGS)
75AC_SUBST(CONFIG_BUILDLIB)
76
77AM_CONDITIONAL([BUILDLIB], [test "x${CONFIG_BUILDLIB}" = "xyes"])
78
79#==============================================================================
80#Trasforming cc1 will break compilation
81M4CFA_PROGRAM_NAME
82
83#==============================================================================
84# Installation paths
85M4CFA_PARSE_PREFIX
86
87# Checks for programs.
88LT_INIT
89
90AC_PROG_CXX
91AC_PROG_CC
92AM_PROG_AS
93AC_PROG_LIBTOOL
94AC_PROG_INSTALL
95AC_PROG_MAKE_SET
96
97AC_CONFIG_FILES([
98        Makefile
99        src/Makefile
100        prelude/Makefile
101        ])
102
103AC_OUTPUT()
104
105# Final text
106AC_MSG_RESULT(Cforall library configuraton completed. Type "make -j 8 install".)
Note: See TracBrowser for help on using the repository browser.