summaryrefslogtreecommitdiffstats
path: root/funtools/mkconfigure
blob: b022ade7b01b5a677818d58669666340399d4ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# directories needing configure files
DIRS=". wcs filter fitsy util"

# is autoconf installed?
hash autoconf 1>/dev/null 2>&1
if [ $? = 0 ]; then
  echo "autoconf installed ... generating configure files ..."
  HAS_AUTOCONF=true
else
  echo "autoconf not installed ... copying failsafe configure files ..."
  HAS_AUTOCONF=false
fi

# recreate configure files
for d in $DIRS; do
    if [ x${HAS_AUTOCONF} = xtrue ]; then
      (cd $d && autoconf)
    else
      (cd $d && cp -p configure-failsafe configure)
    fi
done