Changeset 534e4e4 for configure.ac


Ignore:
Timestamp:
Aug 3, 2018, 4:05:38 PM (7 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:
4dcaed2
Parents:
ba9baad
Message:

Some clean-up before tackling finding directories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rba9baad r534e4e4  
    88AC_CONFIG_HEADERS([config.h:src/config.h.in])
    99AM_SILENT_RULES([no])
     10
     11m4_include([automake/cfa.m4])
    1012
    1113AM_INIT_AUTOMAKE([subdir-objects])
     
    8183#==============================================================================
    8284# Installation paths
    83 if test "x$prefix" = "xNONE"; then
    84         cfa_prefix=${ac_default_prefix}
    85 else
    86         cfa_prefix=${prefix}
    87 fi
    88 AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.])
    89 AC_SUBST(CFA_PREFIX, ${cfa_prefix})
    90 
    91 if test "$includedir" = '${prefix}/include'; then
    92         cfa_incdir="${cfa_prefix}/include/${cfa_name}"
    93 else
    94         cfa_incdir=${includedir}
    95 fi
    96 AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
    97 AC_SUBST(CFA_INCDIR, ${cfa_incdir})
    98 
    99 if test "$bindir" = '${exec_prefix}/bin'; then
    100         cfa_bindir="${cfa_prefix}/bin"
    101 else
    102         cfa_bindir=${bindir}
    103 fi
    104 AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
    105 AC_SUBST(CFA_BINDIR, ${cfa_bindir})
    106 
    107 if test "$libdir" = '${exec_prefix}/lib'; then
    108         cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
    109 else
    110         cfa_libdir=${libdir}
    111 fi
    112 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
    113 AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
     85M4CFA_PARSE_PREFIX
    11486
    11587#==============================================================================
     
    142114do
    143115        #strip quotes surrouding values
    144         var=$(echo $var | sed s/\'//g)
    145116        case $var in
    146117                # skip cross compilation related arguments
    147                 --host=*) ;; host_alias=*) ;; --build=*) ;; build_alias=*) ;; --target=*) ;; target_alias=*) ;;
     118                \'--host=*) ;; \'host_alias=*) ;; \'--build=*) ;; \'build_alias=*) ;; \'--target=*) ;; \'target_alias=*) ;;
    148119
    149120                # skip the target hosts
    150                 --with-target-hosts=*) ;;
     121                \'--with-target-hosts=*) ;;
    151122
    152123                # append all other arguments to the sub configure arguments
     
    172143do
    173144        # call your procedure/other scripts here below
    174         lib_arch=$(echo $i | sed -r "s/:(.*)//g")
     145        arch_name=$(echo $i | sed -r "s/:(.*)//g")
    175146        lib_config=$(echo $i | sed -r "s/(.*)://g")
     147        if test $lib_config != "nodebug";
     148        then
     149                if test $lib_config != "debug";
     150                then
     151                        if test $lib_config != "nolib";
     152                        then
     153                                >&2 echo "Configuration must be 'debug', 'nodebug' or 'nolib'"
     154                                exit 1
     155                        fi
     156                fi
     157        fi
     158
     159        lib_arch=$($ac_aux_dir/config.sub $arch_name)
     160        if test "$?" != "0"; then
     161                >&2 echo "Unkown architecture " $arch_name;
     162                exit 1;
     163        fi
    176164        lib_dir="libcfa-${lib_arch}-${lib_config}"
    177165
Note: See TracChangeset for help on using the changeset viewer.