Ticket #61198: llvm-3.3-configure-patch.diff

File llvm-3.3-configure-patch.diff, 3.6 KB (added by ballapete (Peter "Pete" Dyballa), 4 years ago)

Proposed patch to work with any of MacPorts' Python versions on old Macs (and solve reports about a '-pipe' command that does not exist)

  • llvm-3.3.src/configure

    old new  
    19871987  fi
    19881988fi
    19891989
    1990 ${CFLAGS=}
    1991 ${CXXFLAGS=}
     1990: ${CFLAGS=}
     1991: ${CXXFLAGS=}
    19921992
    19931993ac_ext=c
    19941994ac_cpp='$CPP $CPPFLAGS'
     
    1232112321echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED" >&6; }
    1232212322
    1232312323
    12324 # Check whether --with-python was given.
    12325 if test "${with_python+set}" = set; then
    12326   withval=$with_python; PYTHON="$withval"
    12327 fi
    12328 
    12329 
    12330 if test -n "$PYTHON" && test -x "$PYTHON" ; then
    12331   { echo "$as_me:$LINENO: checking for python" >&5
    12332 echo $ECHO_N "checking for python... $ECHO_C" >&6; }
    12333   { echo "$as_me:$LINENO: result: user defined: $with_python" >&5
    12334 echo "${ECHO_T}user defined: $with_python" >&6; }
    12335 else
    12336   if test -n "$PYTHON" ; then
    12337     { echo "$as_me:$LINENO: WARNING: specified python ($PYTHON) is not usable, searching path" >&5
    12338 echo "$as_me: WARNING: specified python ($PYTHON) is not usable, searching path" >&2;}
    12339   fi
    12340 
    12341   # Extract the first word of "python python2 python26", so it can be a program name with args.
    12342 set dummy python python2 python26; ac_word=$2
    12343 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    12344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    12345 if test "${ac_cv_path_PYTHON+set}" = set; then
    12346   echo $ECHO_N "(cached) $ECHO_C" >&6
    12347 else
    12348   case $PYTHON in
    12349   [\\/]* | ?:[\\/]*)
    12350   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
    12351   ;;
    12352   *)
    12353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    12354 for as_dir in $PATH
    12355 do
    12356   IFS=$as_save_IFS
    12357   test -z "$as_dir" && as_dir=.
    12358   for ac_exec_ext in '' $ac_executable_extensions; do
    12359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    12360     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    12361     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    12362     break 2
    12363   fi
    12364 done
    12365 done
    12366 IFS=$as_save_IFS
    12367 
    12368   test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="{ echo "$as_me:$LINENO: result: not found" >&5
    12369 echo "${ECHO_T}not found" >&6; }
    12370                 { { echo "$as_me:$LINENO: error: could not find python 2.5 or higher" >&5
    12371 echo "$as_me: error: could not find python 2.5 or higher" >&2;}
    12372    { (exit 1); exit 1; }; }"
    12373   ;;
    12374 esac
    12375 fi
    12376 PYTHON=$ac_cv_path_PYTHON
    12377 if test -n "$PYTHON"; then
    12378   { echo "$as_me:$LINENO: result: $PYTHON" >&5
    12379 echo "${ECHO_T}$PYTHON" >&6; }
    12380 else
    12381   { echo "$as_me:$LINENO: result: no" >&5
    12382 echo "${ECHO_T}no" >&6; }
    12383 fi
    12384 
    12385 
    12386 fi
    12387 
    12388 { echo "$as_me:$LINENO: checking for python >= 2.5" >&5
    12389 echo $ECHO_N "checking for python >= 2.5... $ECHO_C" >&6; }
    12390 ac_python_version=`$PYTHON -c 'import sys; print sys.version.split()[0]'`
    12391 ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1`
    12392 ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2`
    12393 ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3`
    12394 if   test "$ac_python_version_major" -eq "2" \
    12395    && test "$ac_python_version_minor" -ge "5" ; then
    12396   { echo "$as_me:$LINENO: result: $PYTHON ($ac_python_version)" >&5
    12397 echo "${ECHO_T}$PYTHON ($ac_python_version)" >&6; }
    12398 else
    12399   { echo "$as_me:$LINENO: result: not found" >&5
    12400 echo "${ECHO_T}not found" >&6; }
    12401   { { echo "$as_me:$LINENO: error: found python $ac_python_version ($PYTHON); required >= 2.5
    12402 See \`config.log' for more details." >&5
    12403 echo "$as_me: error: found python $ac_python_version ($PYTHON); required >= 2.5
    12404 See \`config.log' for more details." >&2;}
    12405    { (exit 1); exit 1; }; }
    12406 fi
    12407 
    12408 
    12409 
    1241012324{ echo "$as_me:$LINENO: checking for sin in -lm" >&5
    1241112325echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6; }
    1241212326if test "${ac_cv_lib_m_sin+set}" = set; then