From 4d9920ab1fccd0f15166cd0e159e434e2fc72b89 Mon Sep 17 00:00:00 2001 From: ewt Date: Mon, 20 Jan 1997 22:34:47 +0000 Subject: [PATCH] 1) use autoconf message facilities 2) look for h_errno CVS patchset: 1329 CVS date: 1997/01/20 22:34:47 --- configure.in | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/configure.in b/configure.in index 2e40de2..5bd9faa 100644 --- a/configure.in +++ b/configure.in @@ -21,17 +21,17 @@ AC_PROG_CPP AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL -echo $ac_n "checking for POSIX chmod... $ac_c" +AC_MSG_CHECKING(checking for POSIX chmod...) touch foo.chmodtest chmod 744 foo.chmodtest chmod +X foo.chmodtest 2>/dev/null a=`ls -l foo.chmodtest | awk '{print $1}'` rm -f foo.chmodtest if test "$a" = "-rwxr-xr-x"; then - echo "yes" + AC_MSG_RESULT(yes) FIXPERMS=a+rX,g-w,o-w else - echo "no (tell your OS vendor about GNU fileutils)" + AC_MSG_RESULT(no (tell your OS vendor about GNU fileutils)) FIXPERMS=a+r,g-w,o-w fi @@ -53,7 +53,7 @@ if test "$cross_compiling" = "no"; then dnl Hope for the best CPIOBIN="cpio" else - echo $ac_n "checking for GNU cpio... $ac_c" + AC_MSG_CHECKING(checking for GNU cpio...) if test -z "$CPIOBIN"; then oldifs="$IFS" IFS=: @@ -69,34 +69,31 @@ else fi if test -z "$CPIOBIN"; then - echo "no" - echo "" - echo "RPM will not work without GNU cpio 2.4.2 or later." - exit 1 + AC_MSG_RESULT(no) + AC_MSG_ERROR(RPM will not work without GNU cpio 2.4.2 or later.) else - echo "yes" + AC_MSG_RESULT(yes) fi fi topdir=`pwd` -echo $ac_n "checking for /usr/local/lib... $ac_c" +AC_MSG_CHECKING(checking for /usr/local/lib...) if test -d /usr/local/lib ; then LIBS="$LIBS -L/usr/local/lib" LIBPATH="$LIBPATH -L/usr/local/lib" - echo "yes" + AC_MSG_RESULT(yes) else - echo "no" + AC_MSG_RESULT(no) fi -echo $ac_n "checking for /usr/local/include... $ac_c" +AC_MSG_CHECKING(checking for /usr/local/include...) if test -d /usr/local/include ; then INCPATH="$INCPATH -I/usr/local/include" - - echo "yes" + AC_MSG_RESULT(yes) else - echo "no" + AC_MSG_RESULT(no) fi dnl Checks for libraries. @@ -182,6 +179,15 @@ fi AC_C_BIGENDIAN +dnl look for libc features +NEEDS_HERRNO=yes +AC_MSG_CHECKING(checking if defines h_errno...) +AC_TRY_LINK(netdb.h,printf("%d",h_errno),NEEDS_ERRNO=no) +AC_MSG_RESULT($NEEDS_HERRNO) +if test $NEEDS_HERRNO = yes; then + AC_DEFINE(HAVE_HERRNO) +fi + dnl Checks for library functions. AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), MISCOBJS="$MISCOBJS inet_aton.o") AC_CHECK_FUNC(realpath, [], MISCOBJS="$MISCOBJS realpath.o") -- 2.7.4