diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-05-14 15:21:45 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-05-14 15:21:45 +0000 |
commit | bc10563c9853e8543e22a5bbf39d9feb7d2ec6f1 (patch) | |
tree | 6a05f1f8c99b83884573380e74030a68299c4d5d | |
parent | 5330a851332355e23b24158b17ce027017a81e38 (diff) |
Added BOTH nsl+socket lib check
Added HOST and TARGET checks
Added automatic update of the *spec.in files (Linux RPM stuff)
-rw-r--r-- | configure.in | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 6091b47a2..d5520cda6 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,"6.5.2") +AM_INIT_AUTOMAKE(curl,"3-test") + +dnl +dnl Detect the canonical host and target build environment +dnl +AC_CANONICAL_HOST +AC_CANONICAL_TARGET dnl Checks for programs. AC_PROG_CC @@ -20,6 +26,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)) @@ -192,13 +219,14 @@ AC_CHECK_FUNCS( socket \ RAND_screen ) + + AC_PATH_PROG( PERL, perl, , $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) AC_SUBST(PERL) AC_PATH_PROGS( NROFF, gnroff nroff, , $PATH:/usr/bin/:/usr/local/bin ) -AC_SUBST(NROFF) AC_PROG_RANLIB AC_PROG_YACC @@ -208,6 +236,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 \ |