91 | | # Check if SAGE_FORTRAN_LIB is set. If so, make sure the file exists. |
92 | | if test x$SAGE_FORTRAN_LIB != x |
93 | | then |
94 | | AC_CHECK_FILE([$SAGE_FORTRAN_LIB],[],[AC_MSG_ERROR([Fortran library $SAGE_FORTRAN_LIB does not exist])]) |
95 | | fi |
96 | | |
97 | | # Check if SAGE_FORTRAN_LIB is a 64-bit binary, if building in 64-bit mode on Solaris |
98 | | # and a 32-bit library if not building in 64-bit mode on Solaris. |
99 | | |
100 | | # 64-bit build. SAGE64 is set to yes. |
101 | | if test "x`uname`" = 'xSunOS' && test x$SAGE_FORTRAN_LIB != 'x' && test x$SAGE64 = 'xyes' |
102 | | then |
103 | | # if test "x`file $SAGE_FORTRAN_LIB | egrep 64-bit`" = 'x' |
104 | | if test "x`file $SAGE_FORTRAN_LIB | grep 64-bit | grep \"dynamic lib\" `" = 'x' |
105 | | then |
106 | | AC_MSG_NOTICE([The environment variable]) |
107 | | AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB]) |
108 | | AC_MSG_NOTICE([is a not a 64-bit dynamic library. SAGE64 was]) |
109 | | AC_MSG_NOTICE([set to "yes", so you intend to build 64-bit.]) |
110 | | AC_MSG_NOTICE([The environment variables SAGE_FORTRAN_LIB and/or SAGE64]) |
111 | | AC_MSG_NOTICE([are not set properly.]) |
112 | | AC_MSG_ERROR([Exiting, due to the incorrect configuration of environment variables]) |
113 | | else |
114 | | AC_MSG_NOTICE([Good, the environment variable]) |
115 | | AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB]) |
116 | | AC_MSG_NOTICE([is a 64-bit dynamic library, as it should]) |
117 | | AC_MSG_NOTICE([be as SAGE64 was set to "yes" ]) |
118 | | fi |
119 | | fi |
120 | | |
121 | | |
122 | | # 32-bit build. SAGE64 is not set to "yes". |
123 | | if test "x`uname`" = 'xSunOS' && test x$SAGE_FORTRAN_LIB != 'x' && test x$SAGE64 != 'xyes' |
124 | | then |
125 | | if test "x`file $SAGE_FORTRAN_LIB | grep 32-bit | grep \"dynamic lib\" `" = 'x' |
126 | | then |
127 | | AC_MSG_NOTICE([The environment variable]) |
128 | | AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB]) |
129 | | AC_MSG_NOTICE([is a not a 32-bit dynamic library. SAGE64 was]) |
130 | | AC_MSG_NOTICE([not set to "yes", so you intend to build 32-bit.]) |
131 | | AC_MSG_NOTICE([The environment variables SAGE_FORTRAN_LIB and/or SAGE64]) |
132 | | AC_MSG_NOTICE([are not set properly.]) |
133 | | AC_MSG_ERROR([Exiting, due to the incorrect configuration of environment variables]) |
134 | | else |
135 | | AC_MSG_NOTICE([Good, the environment variable]) |
136 | | AC_MSG_NOTICE([SAGE_FORTRAN_LIB=$SAGE_FORTRAN_LIB]) |
137 | | AC_MSG_NOTICE([is a 32-bit dynamic library, as it should]) |
138 | | AC_MSG_NOTICE([be as SAGE64 was not set to "yes" ]) |
139 | | fi |
140 | | fi |
141 | | |