diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-07-25 07:29:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-07-25 07:29:32 +0000 |
commit | caf8c01e85d3ceeabd8cce132009854ec5f327d5 (patch) | |
tree | 278a221fdd05b797f57e23207e8e9e16103b9e1b | |
parent | e999182758f809fb8a173c0caec2283d4bbfe280 (diff) |
re-added the check for BOTH nsl and socket libs
-rw-r--r-- | configure.in | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 32ad325ee..82184caa4 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,13 @@ dnl $Id$ dnl Process this file with autoconf to produce a configure script. AC_INIT(lib/urldata.h) AM_CONFIG_HEADER(config.h src/config.h) -AM_INIT_AUTOMAKE(curl,"7.0.1beta") +AM_INIT_AUTOMAKE(curl,"7.0.8beta") + +dnl +dnl Detect the canonical host and target build environment +dnl +AC_CANONICAL_HOST +AC_CANONICAL_TARGET dnl Checks for programs. AC_PROG_CC @@ -98,6 +104,27 @@ dnl ********************************************************************** dnl nsl lib? AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)) +dnl At least one system has been identified to require BOTH nsl and +dnl socket libs to link properly. +if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname"; then + AC_MSG_CHECKING([trying both nsl and socket libs]) + my_ac_save_LIBS=$LIBS + LIBS="-lnsl -lsocket $LIBS" + AC_TRY_LINK( , + [gethostbyname();], + my_ac_link_result=success, + my_ac_link_result=failure ) + + if test "$my_ac_link_result" = "failure"; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([couldn't find libraries for gethostbyname()]) + dnl restore LIBS + LIBS=$my_ac_save_LIBS + else + AC_MSG_RESULT([yes]) + fi +fi + dnl resolve lib? AC_CHECK_FUNC(strcasecmp, , AC_CHECK_LIB(resolve, strcasecmp)) @@ -308,6 +335,8 @@ dnl $PATH:/usr/bin/:/usr/local/bin ) dnl AC_SUBST(RANLIB) AC_OUTPUT( Makefile \ + curl.spec \ + curl-ssl.spec \ src/Makefile \ lib/Makefile ) dnl perl/checklinks.pl \ |