1) added --disable-nls

2) slight support for cross compiling
3) check for libintl.h

CVS patchset: 1228
CVS date: 1996/12/12 03:32:40
This commit is contained in:
ewt 1996-12-12 03:32:40 +00:00
parent 329e94d98e
commit 2e1c47a108
1 changed files with 97 additions and 61 deletions

View File

@ -6,27 +6,38 @@ dnl it, why check it?
AC_INIT(rpm.c)
topdir=`pwd`
dnl default to not using NLS
XGETTEXT=""
LIBINTL=""
PO=""
GETTEXTSTUB="gettextstub.o"
echo $ac_n "checking for /usr/local/lib... $ac_c"
if test -d /usr/local/lib ; then
LIBS="$LIBS -L/usr/local/lib"
LIBPATH="$LIBPATH -L/usr/local/lib"
AC_CANONICAL_SYSTEM
echo "yes"
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_CHECK_TOOL(RANLIB, 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
echo "no"
fi
echo $ac_n "checking for /usr/local/include... $ac_c"
if test -d /usr/local/include ; then
INCPATH="$INCPATH -I/usr/local/include"
echo "yes"
else
echo "no"
fi
echo $ac_n "checking for GNU cpio... $ac_c"
if test -z "$CPIOBIN"; then
oldifs="$IFS"
@ -50,23 +61,39 @@ if test -z "$CPIOBIN"; then
else
echo "yes"
fi
fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
topdir=`pwd`
AC_AIX
AC_MINIX
AC_ISC_POSIX
echo $ac_n "checking for /usr/local/lib... $ac_c"
if test -d /usr/local/lib ; then
LIBS="$LIBS -L/usr/local/lib"
LIBPATH="$LIBPATH -L/usr/local/lib"
AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
echo "yes"
else
echo "no"
fi
echo $ac_n "checking for /usr/local/include... $ac_c"
if test -d /usr/local/include ; then
INCPATH="$INCPATH -I/usr/local/include"
echo "yes"
else
echo "no"
fi
dnl Checks for libraries.
dnl
dnl handle --disable-nls
dnl
AC_ARG_ENABLE([nls],
[ --disable-nls do not use National Language Support],
USE_NLS=$enableval, USE_NLS=yes)
if test "$USE_NLS" != "no"; then
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
AC_CHECK_LIB(intl, gettext, [LIBINTL="-lintl" HAVEGETTEXT="y"],
AC_MSG_WARN([sorry this package needs libintl.a (from the
@ -85,18 +112,14 @@ fi
if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
echo "xgettext and gettext() exist; will build i18n support"
INTLDEF=-D_\\\(String\\\)=gettext\\\(String\\\)
PO=po
GETTEXTSTUB=""
else
echo "xgettext and libintl.a don't both exist; will not build i18n support"
INTLDEF=-D_\\\(a\\\)=a
XGETTEXT=""
LIBINTL=""
PO=""
GETTEXTSTUB="gettextstub.o"
fi
else
echo "user specificed no gettext; will not build i18n support"
fi
AC_CHECK_FUNC(dbopen, [],
AC_CHECK_LIB(db, dbopen, [], AC_MSG_WARN([sorry this package needs libdb.a
@ -106,6 +129,15 @@ AC_CHECK_FUNC(dbopen, [],
AC_CHECK_FUNC(fork, [], [echo "using vfork() instead of fork()";
MISCOBJS=fakefork.o], $LIBS)
dnl AmigaOS and IXEmul have a fork() dummy
case "$target" in
m68k-*-amigaos )
echo "Building for AmigaOS: using vfork() instead of fork()";
CFLAGS="$CFLAGS -Dfork=vfork"
;;
esac
AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"])
@ -123,6 +155,12 @@ AC_SUBST(ZLIB)
dnl Checks for header files we can live without.
AC_CHECK_HEADERS(netinet/in_systm.h)
AC_CHECK_HEADERS(alloca.h)
AC_CHECK_HEADERS(machine/types.h)
if test "$PO" = po; then
AC_CHECK_HEADERS(libintl.h)
fi
AC_C_BIGENDIAN
@ -153,8 +191,6 @@ if test "x$tmpdir" = "x"; then
fi
fi
AC_CANONICAL_SYSTEM
if echo "$build" | grep solaris >/dev/null ; then
# Solaris needs -ldl to use -lnsl, and it can't build static
# binaries if you use -ldl