@@ -6,81 +6,24 @@ if [ -z "$SAGE_LOCAL" ]; then
66 exit 1
77fi
88
9- if [ " x$SAGE64 " = xyes ]; then
10- echo " Building a 64-bit version of lcalc"
11-
12- # Both Sun and GNU compilers use -m64 to build 64-bit code, but compilers
13- # from IBM (on AIX), and HP (on HP-UX) do not. So allow the environment
14- # variables CFLAG64 and CXXFLAG64 to set the flag to whatever option the
15- # C and C++ compilers want for 64-bit code. If not set, default to -m64.
9+ cd src
1610
17- if [ -z " $CFLAG64 " ]; then
18- CFLAG64=-m64
19- fi
20- if [ -z " $CXXFLAG64 " ]; then
21- CXXFLAG64=" $CFLAG64 " # default to that of the C compiler
22- fi
11+ echo " Now installing lcalc binary, library and header files..."
12+ rm -fr " $SAGE_LOCAL " /include/libLfunction
2313
24- CFLAGS=" $CFLAGS $CFLAG64 "
25- CXXFLAGS=" $CXXFLAGS $CXXFLAG64 "
26- fi
14+ cd src # Now we are in src/src.
2715
28- # If SAGE_DEBUG is set to 'yes', add debugging information. Since both
29- # the Sun and GNU compilers accept -g to give debugging information,
30- # there is no need to do anything specific to one compiler or the other.
31- if [ " x$SAGE_DEBUG " = xyes ]; then
32- echo " Code will be built with debugging information present. Unset 'SAGE_DEBUG'"
33- echo " or set it to 'no' if you don't want that."
16+ $MAKE install INSTALL_DIR=" $SAGE_LOCAL "
3417
35- CFLAGS=" $CFLAGS -O0 -g"
36- CXXFLAGS=" $CXXFLAGS -O0 -g"
37- else
38- echo " No debugging information will be used during the build of this package."
39- echo " Set 'SAGE_DEBUG' to 'yes' if you want debugging information present (-g added)."
18+ if [ " $UNAME " = " Darwin" ]; then
19+ install_name_tool -id ${SAGE_LOCAL} /lib/libLfunction.dylib " ${SAGE_LOCAL} " /lib/libLfunction.dylib
4020fi
4121
42- # Export everything. Probably not necessary in most cases.
43- export CFLAGS
44- export CXXFLAGS
45-
4622success () {
4723 if [ $? -ne 0 ]; then
4824 echo >&2 " Error building the Lcalc package: '$1 '"
4925 exit 1
5026 fi
5127}
5228
53- export DEFINES=" "
54-
55- # Set installation directory
56- export INSTALL_DIR=" $SAGE_LOCAL /"
57-
58- cd src
59-
60- # Apply Sage-specific patches: (See SPKG.txt for details on the patches.)
61- echo " Patching the upstream source code for Sage..."
62- for patch in ../patches/* .patch; do
63- patch -p1 < " $patch "
64- success " patch $patch failed to apply"
65- done
66-
67- # There's currently no 'configure' script for Lcalc; we (also) configure
68- # it by patching the Makefile. This may change in a later release of Lcalc.
69-
70- cd src # Now we are in src/src.
71-
72- # Build everything:
73- echo " Now building lcalc, example programs and the shared library..."
74- $MAKE
75- success " $MAKE "
76-
77- # Install everything
78- echo " Now installing lcalc binary, library and header files..."
79- rm -fr " $SAGE_LOCAL " /include/libLfunction
80- $MAKE install
81-
82- if [ " $UNAME " = " Darwin" ]; then
83- install_name_tool -id ${SAGE_LOCAL} /lib/libLfunction.dylib " ${SAGE_LOCAL} " /lib/libLfunction.dylib
84- fi
85-
8629success " $MAKE install"
0 commit comments