From: ewt Date: Thu, 1 May 1997 19:07:43 +0000 (+0000) Subject: 1) Added search for gzip binary X-Git-Tag: tznext/4.11.0.1.tizen20130304~10378 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b86bcefc78929bb9ad1593e625c9d630359c2012;p=tools%2Flibrpm-tizen.git 1) Added search for gzip binary 2) Don't die if gzip/cpio not found, just look in path at run time 3) Fixed problems with stat macro detection CVS patchset: 1582 CVS date: 1997/05/01 19:07:43 --- diff --git a/configure.in b/configure.in index 59f58c5..6bee8b8 100644 --- a/configure.in +++ b/configure.in @@ -46,12 +46,9 @@ AC_PROG_RANLIB AC_CHECK_TOOL(AR, ar, :) -if test "$cross_compiling" = "no"; then - dnl Don't bother checking these if we're cross compiling - - dnl Hope for the best - CPIOBIN="cpio" -else +CPIOBIN="cpio" +GZIPBIN="gzip" +if test "$cross_compiling" != "yes"; then AC_MSG_CHECKING(checking for GNU cpio...) if test -z "$CPIOBIN"; then oldifs="$IFS" @@ -69,7 +66,26 @@ else if test -z "$CPIOBIN"; then AC_MSG_RESULT(no) - AC_MSG_ERROR(RPM will not work without GNU cpio 2.4.2 or later.) + AC_MSG_WARN(RPM will not work without GNU cpio 2.4.2 or later.) + else + AC_MSG_RESULT(yes) + fi + + AC_MSG_CHECKING(checking for GNU gzip...) + if test -z "$GZIPBIN"; then + oldifs="$IFS" + IFS=: + for n in $PATH:/opt/gnu/bin; do + if test -f $n/gzip; then + GZIPBIN="$n/gzip"; + fi + done + IFS="$oldifs" + fi + + if test -z "$GZIPBIN"; then + AC_MSG_RESULT(no) + AC_MSG_WARN(RPM will not work without GNU gzip.) else AC_MSG_RESULT(yes) fi @@ -115,8 +131,8 @@ else fi AC_MSG_CHECKING(checking for /usr/ucblib...) -if test -d /usr/local/lib ; then - LIBS="$LIBS -L/usr/local/lib" +if test -d /usr/ucblib ; then + LIBS="$LIBS -L/usr/ucblib" AC_MSG_RESULT(yes) else @@ -164,8 +180,8 @@ else echo "user specificed no gettext; will not build i18n support" fi -AC_CHECK_FUNC(gethostbyname, [], [ - AC_CHECK_LIB(nsl, gethostbyname, [LIBS="-lnsl $LIBS"]) +AC_CHECK_FUNC(getdomainname, [], [ + AC_CHECK_LIB(nsl, getdomainname, [LIBS="-lnsl $LIBS"]) ]) AC_CHECK_FUNC(socket, [], [ AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"]) @@ -214,7 +230,7 @@ AC_C_BIGENDIAN dnl look for libc features PROVIDES_ERRNO=no -AC_MSG_CHECKING(checking if defines h_errno...) +AC_MSG_CHECKING(if defines h_errno...) AC_TRY_LINK([#include ],printf("%d",h_errno),PROVIDES_ERRNO=yes) AC_MSG_RESULT($PROVIDES_ERRNO) if test $PROVIDES_ERRNO = yes; then @@ -223,28 +239,28 @@ fi dnl If a system doesn't have S_IFSOCK, define it as 0 which will dnl make S_ISSOCK always return false (nice, eh?) -AC_MSG_CHECKING(checking if defines S_IFSOCK...) +AC_MSG_CHECKING(if defines S_IFSOCK...) AC_TRY_LINK([#include ],printf("%d", S_IFSOCK), HAS_S_IFSOCK=yes,HAS_S_IFSOCK=no) AC_MSG_RESULT($HAS_S_IFSOCK) -if test $HAS_S_ISLNK=yes; then +if test $HAS_S_IFSOCK = yes; then AC_DEFINE(HAVE_S_IFSOCK) fi dnl Some Unix's are missing S_ISLNK, S_ISSOCK -AC_MSG_CHECKING(checking if defines S_ISLNK...) +AC_MSG_CHECKING(if defines S_ISLNK...) AC_TRY_LINK([#include ],printf("%d", S_ISLNK(0755)), HAS_S_ISLNK=yes,HAS_S_ISLNK=no) AC_MSG_RESULT($HAS_S_ISLNK) -if test $HAS_S_ISLNK=yes; then +if test $HAS_S_ISLNK = yes; then AC_DEFINE(HAVE_S_ISLNK) fi -AC_MSG_CHECKING(checking if defines S_ISSOCK...) +AC_MSG_CHECKING(if defines S_ISSOCK...) AC_TRY_LINK([#include ],printf("%d", S_ISSOCK(0755)), HAS_S_ISSOCK=yes,HAS_S_ISSOCK=no) AC_MSG_RESULT($HAS_S_ISSOCK) -if test $HAS_S_ISSOCK=yes; then +if test $HAS_S_ISSOCK = yes; then AC_DEFINE(HAVE_S_ISSOCK) fi @@ -323,6 +339,7 @@ AC_SUBST(PO) AC_SUBST(GETTEXTSTUB) AC_SUBST(RPM) AC_SUBST(CPIOBIN) +AC_SUBST(GZIPBIN) AC_SUBST(FIXPERMS) AC_OUTPUT(Makefile Makefile.inc lib-rpmrc lib/Makefile build/Makefile tools/Makefile po/Makefile misc/Makefile)