File: autogen.sh

package info (click to toggle)
mpich 4.3.0%2Breally4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 419,120 kB
  • sloc: ansic: 1,215,557; cpp: 74,755; javascript: 40,763; f90: 20,649; sh: 18,463; xml: 14,418; python: 14,397; perl: 13,772; makefile: 9,279; fortran: 8,063; java: 4,553; asm: 324; ruby: 176; lisp: 19; php: 8; sed: 4
file content (28 lines) | stat: -rwxr-xr-x 868 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

# Exit on error, useful if autoconf is missing, the script will stop instead of
# trying to continue.
set -e

srcdir=$(dirname "$0")
if test "x$srcdir" != x; then
   # in case we ever autogen on a platform without dirname
  cd $srcdir
fi

autoreconf ${autoreconf_args:-"-ivf"}

echo -n "Checking whether configure needs patching for MacOS Big Sur libtool.m4 bug... "
if grep -A1 MACOSX_DEPLOYMENT_TARGET configure | grep powerpc >/dev/null \
   || grep -A1 MACOSX_DEPLOYMENT_TARGET configure | grep 'darwin\[912' >/dev/null; then
  echo "no"
else
  echo "yes"
  echo "Trying to patch configure..."
  if patch -p1 --dry-run < config/libtool-big-sur-fixup.patch >/dev/null 2>&1; then
     echo "Patching for real now"
     patch -p1 < config/libtool-big-sur-fixup.patch
  else
     echo "WARNING: Couldn't apply Big Sur libtool.m4 bug fix."
  fi
fi