aboutsummaryrefslogtreecommitdiff
path: root/libf2c
diff options
context:
space:
mode:
authorDave Love <fx@gcc.gnu.org>1998-07-06 09:01:43 +0000
committerDave Love <fx@gcc.gnu.org>1998-07-06 09:01:43 +0000
commita60cb98615df7322ca32c4889f3d57d7fa577fce (patch)
tree933432a58d0d03520c2b9cb1507d14ea6f56b2fb /libf2c
parentb4ce1e193b0956b03a7fbca5c6d2e641d1be79e7 (diff)
downloadgcc-a60cb98615df7322ca32c4889f3d57d7fa577fce.zip
gcc-a60cb98615df7322ca32c4889f3d57d7fa577fce.tar.gz
gcc-a60cb98615df7322ca32c4889f3d57d7fa577fce.tar.bz2
[multiple changes]
1998-07-06 Dave Love <d.love@dl.ac.uk> * libU77/Makefile.in (lib): Change variable lib to LIBS. 1998-07-06 Robert Lipe <robertl@dgii.com> * libU77/configure.in: Look for -lsocket, add to LIBS if found. * libU77/Makefile.in (lib): Use LIBS from above. From-SVN: r20941
Diffstat (limited to 'libf2c')
-rw-r--r--libf2c/ChangeLog32
-rw-r--r--libf2c/libU77/Makefile.in3
-rwxr-xr-xlibf2c/libU77/configure47
-rw-r--r--libf2c/libU77/configure.in3
4 files changed, 81 insertions, 4 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 575c18a..ebf47d2 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -1,3 +1,35 @@
+1998-07-06 Dave Love <d.love@dl.ac.uk>
+
+ * libU77/Makefile.in (lib): Change variable lib to LIBS.
+
+1998-07-06 Robert Lipe <robertl@dgii.com>
+
+ * libU77/configure.in: Look for -lsocket, add to LIBS if found.
+
+ * libU77/Makefile.in (lib): Use LIBS from above.
+
+1998-07-05 Dave Love <d.love@dl.ac.uk>
+
+ * f2cext.c (system_clock_): Remove (just f90 intrinsic).
+
+ * Makefile.in (F2CEXT): Add datetime, remove sclock.
+ (UOBJ): Add libU77/datetime_.o.
+
+ * libU77/config.h.in: Add HAVE_GETTIMEOFDAY.
+
+ * libU77/configure.in: Check for gettimeofday.
+
+ * libU77/datetime_.c: New file.
+
+ * libU77/sys_clock_.c: Allow optional args.
+
+ * libU77/Makefile.in (G77DIR): Fix for current directory
+ structure.
+ (SRCS, OBJS): Add datetime.
+
+ * libU77/u77-test.f: Call date_and_time. Call system_clock
+ omitting args.
+
1998-06-29 Dave Love <d.love@dl.ac.uk>
* libI77/wsfe.c (s_wsfe): Fix setting of f__curunit lost in
diff --git a/libf2c/libU77/Makefile.in b/libf2c/libU77/Makefile.in
index 8554293..7d495b8 100644
--- a/libf2c/libU77/Makefile.in
+++ b/libf2c/libU77/Makefile.in
@@ -30,6 +30,7 @@ VPATH = @srcdir@
# gcc/f/runtime/configure sets this to all the -D options appropriate
# for the configuration.
DEFS = @DEFS@
+LIBS = @LIBS@
#### End of system configuration section. ####
@@ -142,7 +143,7 @@ lint:
lint $(ALL_CFLAGS) $(SRCS)
check:
- -$(G77DIR)g77 -B$(G77DIR) -ff90-intrinsics-enable -L.. -g $(srcdir)/u77-test.f $(lib) && ./a.out
+ -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f $(LIBS) && ./a.out
rm -f a.out
.PHONY: lint check all
diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure
index 7158236..61d9816 100755
--- a/libf2c/libU77/configure
+++ b/libf2c/libU77/configure
@@ -1341,18 +1341,59 @@ EOF
fi
+echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
+echo "configure:1346: checking for gethostname in -lsocket" >&5
+ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1354 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostname();
+
+int main() {
+gethostname()
+; return 0; }
+EOF
+if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -lsocket"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
for ac_func in symlink getcwd getwd lstat gethostname strerror clock \
getrusage times alarm getlogin getgid getuid kill link ttyname \
gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1351: checking for $ac_func" >&5
+echo "configure:1392: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1356 "configure"
+#line 1397 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1375,7 +1416,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/libf2c/libU77/configure.in b/libf2c/libU77/configure.in
index 0eb44e7..c2a5d7c 100644
--- a/libf2c/libU77/configure.in
+++ b/libf2c/libU77/configure.in
@@ -95,6 +95,9 @@ AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_RDEV
AC_STRUCT_TM
+dnl Some systems (SVR4, SCO OpenServer) need -lsocket for gethostname()
+AC_CHECK_LIB(socket, gethostname, [LIBS="$LIBS -lsocket"])
+
dnl Checks for library functions.
AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \