Changeset 37fe352 for configure.ac


Ignore:
Timestamp:
Aug 5, 2018, 4:11:41 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
28582b2
Parents:
4dcaed2
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r4dcaed2 r37fe352  
    1919#==============================================================================
    2020#Trasforming cc1 will break compilation
    21 if test "${program_transform_name}" = ""; then
    22     AC_MSG_ERROR([Program transform not supported.
    23                 Use --with-cfa-name='[[Desired name here]]' instead])
    24 fi
    25 
    26 #Define the new name of the installed command
    27 AC_ARG_WITH(cfa-name,
    28         [  --with-cfa-name=NAME     NAME too which cfa will be installed],
    29         cfa_name=$withval, cfa_name="cfa")
    30 
    31 AC_SUBST(CFA_NAME, ${cfa_name})
    32 
     21M4CFA_PROGRAM_NAME
    3322
    3423#==============================================================================
     
    143132        arch_name=$(echo $i | sed -r "s/:(.*)//g")
    144133        lib_config=$(echo $i | sed -r "s/(.*)://g")
    145         if test $lib_config != "nodebug";
    146         then
    147                 if test $lib_config != "debug";
    148                 then
    149                         if test $lib_config != "nolib";
    150                         then
    151                                 >&2 echo "Configuration must be 'debug', 'nodebug' or 'nolib'"
    152                                 exit 1
    153                         fi
    154                 fi
    155         fi
    156 
    157         lib_arch=$($ac_aux_dir/config.sub $arch_name)
    158         if test "$?" != "0"; then
    159                 >&2 echo "Unkown architecture " $arch_name;
    160                 exit 1;
    161         fi
     134
     135        case $lib_config in
     136                "nodebug") ;;
     137                "debug") ;;
     138                "nolib") ;;
     139                *)
     140                        >&2 echo "Configuration must be 'debug', 'nodebug' or 'nolib'"
     141                        exit 1
     142                ;;
     143        esac
     144
     145        M4CFA_CANNON_CPU([${arch_name}])
     146        lib_arch=${cannon_arch_name}
    162147        lib_dir="libcfa-${lib_arch}-${lib_config}"
    163148
     
    168153        echo -n "${LIBCFA_GENERAL_ARGS} " > libcfa-${lib_arch}-${lib_config}/config.data
    169154        echo -n "${LIBCFA_PATHS} " >> libcfa-${lib_arch}-${lib_config}/config.data
    170         echo -n "--host=${lib_arch} " >> libcfa-${lib_arch}-${lib_config}/config.data
     155        echo -n "ARCHITECTURE=${lib_arch} " >> libcfa-${lib_arch}-${lib_config}/config.data
    171156        echo -n "CONFIGURATION=${lib_config}" >> libcfa-${lib_arch}-${lib_config}/config.data
    172157done
     
    174159AC_SUBST(LIBCFA_TARGET_DIRS)
    175160AC_SUBST(LIBCFA_TARGET_MAKEFILES)
     161
     162M4CFA_CANNON_CPU([${host_cpu}])
     163AC_DEFINE_UNQUOTED(CFA_DEFAULT_CPU, "$cannon_arch_name", [Default cpu to use if neither -m32 or -m64 are defined.])
     164AC_DEFINE_UNQUOTED(CFA_64_CPU, "x64", [CPU to use if the -m64 flags is given.])
     165AC_DEFINE_UNQUOTED(CFA_32_CPU, "x86", [CPU to use if the -m32 flags is given.])
    176166
    177167#==============================================================================
Note: See TracChangeset for help on using the changeset viewer.