aboutsummaryrefslogtreecommitdiff
path: root/src/configure.linux64.orig
blob: e0c989b4577d8622d78137f6164bd5e0615b3285 (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh

echo "***********************************"
echo "***** Preparing Makefiles *********"
echo "******** for Linux 64 *************"
echo "***********************************"

cp Makefile.Linux64 Makefile
cp fuv/Makefile.Linux64 fuv/Makefile
cp fes/Makefile.Linux64 fes/Makefile
cp analysis/Makefile.Linux64 analysis/Makefile
cp libcf/Makefile.Linux64 libcf/Makefile
cp cal/jitter/Makefile.Linux64 cal/jitter/Makefile
cp slalib/mk.sv slalib/mk

FC=""
for ac_prog in gfortran g77 
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo "checking for $ac_word..."  
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      FC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
  if test -n "$FC"; then
    echo "     yes"
  else
    echo "     no"
  fi
  test -n "$FC" && break
done
test -n "$FC" || FC="nope"

if test $FC = 'nope' ; then
  echo "Warning: No acceptable fortran compiler was found. Please install one from the GNU compilers."
  echo " Read INSTALLING_CalFUSEv3.2.1 for details."
else
  echo "checking for cfitsio..."
  if ! test -d /usr/include/cfitsio ; then
    echo "     no"
    echo ""
    echo "Warning: CFITSIO was not found in /usr/include"
    echo " Please install CFITSIO for Linux 64 as explained in the installation notes"
    echo " If you already did so and still get this message, please copy the cfitsio"
    echo " repertory in '/usr/include'"
    echo " If you don't have permission to do so, follow the instructions in the"
    echo " Installation notes."
    echo ""
  else
    echo "     yes"
    cp /usr/include/cfitsio/* ../include/
    cp /usr/include/cfitsio/* ../include/cfitsio/

    if test $FC = 'g77' ; then
      for mk in Makefile fuv/Makefile analysis/Makefile libcf/Makefile cal/jitter/Makefile
      do
        mv $mk ${mk}.sv
        sed -e "s/-lgfortran/-lg2c/g" ${mk}.sv > $mk
#cfit	mv $mk ${mk}.sv2
#cfit	sed -e "s#-lcfitsio#-lcfitsio -L/usr/include/cfitsio/lib#g" ${mk}.sv2 > $mk
      done  
      sed -e "s/gfortran/g77/g" slalib/mk.sv > slalib/mk
    fi 
    echo
    echo "Type 'make clean' then 'make -e install'"
  fi
fi