diff options
author | Dave Love <d.love@dl.ac.uk> | 1998-07-06 09:01:43 +0000 |
---|---|---|
committer | Dave Love <d.love@dl.ac.uk> | 1998-07-06 09:01:43 +0000 |
commit | 16678b39c7604deef29dbb5782878456ef05c70c (patch) | |
tree | 933432a58d0d03520c2b9cb1507d14ea6f56b2fb /libf2c/libU77/configure | |
parent | 7fa88bb1851163f001545d27804f6752e4155c60 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@20941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libU77/configure')
-rwxr-xr-x | libf2c/libU77/configure | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure index 71582362e82..61d9816455d 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 |