source: automake/cfa.m4@ ff593a3

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr no_list persistent-indexer pthread-emulation qualifiedEnum
Last change on this file since ff593a3 was 37fe352, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added proper multi-lib handling, tests still do not work and arm support is broken

  • Property mode set to 100644
File size: 2.0 KB
Line 
1
2m4_define([M4CFA_PARSE_PREFIX], [
3 if test "x$prefix" = "xNONE"; then
4 cfa_prefix=${ac_default_prefix}
5 else
6 cfa_prefix=${prefix}
7 fi
8 AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.])
9 AC_SUBST(CFA_PREFIX, ${cfa_prefix})
10
11 if test "$includedir" = '${prefix}/include'; then
12 cfa_incdir="${cfa_prefix}/include/${cfa_name}"
13 else
14 cfa_incdir=${includedir}
15 fi
16 AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
17 AC_SUBST(CFA_INCDIR, ${cfa_incdir})
18
19 if test "$bindir" = '${exec_prefix}/bin'; then
20 cfa_bindir="${cfa_prefix}/bin"
21 else
22 cfa_bindir=${bindir}
23 fi
24 AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
25 AC_SUBST(CFA_BINDIR, ${cfa_bindir})
26
27 if test "$libdir" = '${exec_prefix}/lib'; then
28 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/${ARCHITECTURE}${CONFIGURATION}"
29 else
30 cfa_libdir="${libdir}/${ARCHITECTURE}${CONFIGURATION}"
31 fi
32 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
33 AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
34])
35
36m4_define([M4CFA_PROGRAM_NAME], [
37 if test "${program_transform_name}" = ""; then
38 AC_MSG_ERROR([Program transform not supported.
39 Use --with-cfa-name='[[Desired name here]]' instead])
40 fi
41
42 #Define the new name of the installed command
43 AC_ARG_WITH(cfa-name,
44 [ --with-cfa-name=NAME NAME too which cfa will be installed],
45 cfa_name=$withval, cfa_name="cfa")
46
47 AC_SUBST(CFA_NAME, ${cfa_name})
48])
49
50AC_DEFUN([M4CFA_CANNON_CPU], [
51 case $arch_name in
52 "x64" ) cannon_arch_name="x64";;
53 "x86-64" ) cannon_arch_name="x64";;
54 "x86_64" ) cannon_arch_name="x64";;
55 "x86" ) cannon_arch_name="x86";;
56 "i386" ) cannon_arch_name="x86";;
57 "i486" ) cannon_arch_name="x86";;
58 "i686" ) cannon_arch_name="x86";;
59 "Intel 80386") cannon_arch_name="x86";;
60 "arm" ) cannon_arch_name="arm";;
61 "ARM" ) cannon_arch_name="arm";;
62 *)
63 >&2 echo "Unkown architecture " $arch_name;
64 exit 1
65 ;;
66 esac
67])
Note: See TracBrowser for help on using the repository browser.