From a60cb98615df7322ca32c4889f3d57d7fa577fce Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 6 Jul 1998 09:01:43 +0000 Subject: [multiple changes] 1998-07-06 Dave Love * libU77/Makefile.in (lib): Change variable lib to LIBS. 1998-07-06 Robert Lipe * libU77/configure.in: Look for -lsocket, add to LIBS if found. * libU77/Makefile.in (lib): Use LIBS from above. From-SVN: r20941 --- libf2c/ChangeLog | 32 +++++++++++++++++++++++++++++++ libf2c/libU77/Makefile.in | 3 ++- libf2c/libU77/configure | 47 +++++++++++++++++++++++++++++++++++++++++++--- libf2c/libU77/configure.in | 3 +++ 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 + + * libU77/Makefile.in (lib): Change variable lib to LIBS. + +1998-07-06 Robert Lipe + + * libU77/configure.in: Look for -lsocket, add to LIBS if found. + + * libU77/Makefile.in (lib): Use LIBS from above. + +1998-07-05 Dave Love + + * 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 * 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 <&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 <&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 \ -- cgit v1.1