Changeset df47e2f for configure


Ignore:
Timestamp:
Mar 6, 2017, 2:06:52 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
3f80888
Parents:
e958ff8
Message:

Added partial support for renaming cfa through autoconf (using --program-transform-name)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    re958ff8 rdf47e2f  
    668668CFA_BACKEND_CC
    669669BACKEND_CC
     670CFA_NAME
    670671MAINT
    671672MAINTAINER_MODE_FALSE
     
    30013002                        # may require auto* software to be installed
    30023003
     3004# Allow program name tansformation
     3005# will fille program_transform_name with appropriate sed regex
     3006
     3007#autoconf escapes $ and \ since automake wiill un-escape them.
     3008#Since we need to use the sed transform in autoconf we need to manualy un-escape these characters
     3009name_transform=`echo ${program_transform_name} | sed 's/\\$\\$/\\$/g' | sed 's/\\\\\\\/\\\/g'`
     3010cfa_name=`echo cfa | sed ${name_transform}`
     3011cc1_name=`echo cc1 | sed ${name_transform}`
     3012cpp_name=`echo cfa-cpp | sed ${name_transform}`
     3013
     3014#Trasforming cc1 will break compilation
     3015if ! test "${cc1_name}" = "cc1"; then
     3016    as_fn_error $? "Program transform must not modify cc1.
     3017                --program-sufix and --program-prefix not supported.
     3018                Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
     3019fi
     3020#We could support transforming cfa-cpp but since it is located in a unique subfolder we don't need to
     3021if ! test "${cpp_name}" = "cfa-cpp"; then
     3022    as_fn_error $? "Program transform must not modify cfa-cpp.
     3023                --program-sufix and --program-prefix not supported.
     3024                Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
     3025fi
     3026
     3027#Define the new name of the installed command
     3028CFA_NAME=${cfa_name}
     3029
     3030
    30033031rm -f version
    30043032echo ${PACKAGE_VERSION} > version               # file containing version number for other tools
     
    32383266
    32393267if test "$includedir" = '${prefix}/include'; then
    3240         cfa_incdir="${cfa_prefix}/include/cfa"
     3268        cfa_incdir="${cfa_prefix}/include/${cfa_name}"
    32413269else
    32423270        cfa_incdir=${includedir}
     
    32643292
    32653293if test "$libdir" = '${exec_prefix}/lib'; then
    3266         cfa_libdir="${cfa_prefix}/lib/cfa"
     3294        cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
    32673295else
    32683296        cfa_libdir=${libdir}
Note: See TracChangeset for help on using the changeset viewer.