-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure
executable file
·95 lines (80 loc) · 2.1 KB
/
configure
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
#
echo $* > .config
MAKEFILES="
./utillib/Makefile
./tablelib/Makefile
./tablesrc/Makefile
./tablefun/Makefile
./python/Makefile
./nlfit/Makefile
./bsd/Makefile
./gnu/Makefile
./Makefile
"
SUBDIRS="utillib tablelib tablesrc tablefun tawk nlfit gnu bsd python"
if [ -d ./radar ] ; then
MAKEFILES="$MAKEFILES ./radar/Makefile ./slalink/Makefile"
SUBDIRS="$SUBDIRS radar slalink"
fi
if [ -d ../slalib ] ; then
MAKEFILES="$MAKEFILES ../slalib/Makefile"
fi
WD=`pwd`
OS=`uname`
CPU=`uname -p`
prefix=""
arch=""
CF=$WD/config
OFS="$IFS"
for arg in $* ; do
case $arg in
*prefix=*) IFS="=" ; set -- $arg; prefix=$2; IFS="$OFS" ;;
*arch=*) IFS="=" ; set -- $arg; arch=.$2; IFS="$OFS" ;;
*slalib=*) IFS="=" ; set -- $arg; SLALIB=$2; IFS="$OFS" ;;
*slainc=*) IFS="=" ; set -- $arg; SLAINC=$2; IFS="$OFS" ;;
*)
echo "unknown option : $arg" 1>&2
exit
;;
esac
done
if [ "$prefix" = "" ] ; then
prefix=`pwd`
fi
if [ "$CC" = "" ] ; then
CC=cc
fi
makemake() {
echo "# Starbase Makefile" > Makefile
echo "#" >> Makefile
echo " WD=$WD" >> Makefile
echo " OS=$OS" >> Makefile
echo "CPU=$CPU" >> Makefile
echo "" >> Makefile
echo "CC=$CC" >> Makefile
echo "" >> Makefile
cat $CF/Makefile.Base >> Makefile
cat $CF/Makefile.$OS >> Makefile
echo "" >> Makefile
echo "prefix=$prefix" >> Makefile
echo "arch=$arch" >> Makefile
echo "" >> Makefile
echo "exec_prefix = \$(prefix)" >> Makefile
echo "exec_arch = \$(arch)" >> Makefile
echo "bindir = \$(exec_prefix)/bin\$(exec_arch)" >> Makefile
echo "libdir = \$(exec_prefix)/lib\$(exec_arch)" >> Makefile
echo "incdir = \$(prefix)/include" >> Makefile
echo "arch=$arch" >> Makefile
echo "" >> Makefile
echo "SUBDIRS=$SUBDIRS" >> Makefile
echo "" >> Makefile
cat Makefile.in >> Makefile
cat $CF/Makefile >> Makefile
}
for makefile in $MAKEFILES ; do
cd `dirname $makefile`; makemake; cd $WD
done
cat $CF/Makefile.Packaging >> Makefile
cd tawk
./configure --prefix=$prefix